diff -r 706f10bcdc3c -r f5690d918358 server/src/app/Libraries/CocoonUtils.php --- a/server/src/app/Libraries/CocoonUtils.php Sun Oct 02 19:11:06 2016 +0200 +++ b/server/src/app/Libraries/CocoonUtils.php Sun Oct 02 19:14:07 2016 +0200 @@ -76,4 +76,14 @@ ); } + public static function getGeonamesidFromUrl($url) { + $matches = []; + if(preg_match(config('corpusparole.geonames_url_regexp'), $url, $matches) === 1) { + return $matches[1]; + } + else { + return null; + } + } + }