Latitude and Longitude Regular Expression

Category: Strings | Views Total: 4 views

A regular expression to parse and validate Latitude and Longitude values.

/^((\-?|\+?)?\d+(\.\d+)?),\s*((\-?|\+?)?\d+(\.\d+)?)$/

Latitude and Longitude Examples:

  • 47.1231231, 179.99999999
  • +90.0, -127.554334
  • -90.000, -180.0
Rate This Regex
Sending
User Review
0 (0 votes)

Leave a Reply