diff -r 07b44a378ad8 -r e032d686d88e server/src/app/Libraries/CocoonUtils.php --- a/server/src/app/Libraries/CocoonUtils.php Fri Sep 30 00:43:04 2016 +0200 +++ b/server/src/app/Libraries/CocoonUtils.php Sun Oct 02 11:49:00 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; + } + } + }