Pattern: Lat-Long Coordinates
Patterns for matching latitude and longitude geographic coordinates
ttheIntuitionist3/26/2025
Patterns
Regular Expressions
^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?)\s*,\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$
ttheIntuitionist3/26/2025
Matching Strings
Matches? | Text | Description | Author |
---|---|---|---|
40.7128, -74.0060 | New York coordinates | ttheIntuitionist | |
-33.8688, 151.2093 | Sydney coordinates | ttheIntuitionist | |
0.0000, 0.0000 | Null Island coordinates | ttheIntuitionist |
Non-matching Strings
Matches? | Text | Description | Author |
---|---|---|---|
91.0000, 0.0000 | Invalid latitude (>90) | ttheIntuitionist | |
0.0000, 181.0000 | Invalid longitude (>180) | ttheIntuitionist |