Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-09-19 04:17
Flavor·PCRE (Legacy)

/
^(?:[-+]?[1-8]?\d(?:\.\d{0,7})?|90(?:\.0{0,7})?),(?:[-+]?(?:180(?:\.0{0,7})?|(?:(?:1[0-7]\d)|(?:[1-9]?\d))(?:\.\d{0,7})?))$
/
Open regex in editor

Description

Matches a geolocation coordinates string consisting of latitude and longitude separated by a comma with up to 7 decimal places precision.

Submitted by Steve Piercy