Below are regex patterns to match against valid latitude and longitude.
Both formats are based on Decimal coordinates.
Latitude range is from -90 to +90
Longitude from -180 to +180
For Latitude the regex pattern is
(-?[0-8]?[0-9](\.\d*)?)|-?90(\.[0]*)?
For Longitude use
(-?([1]?[0-7][1-9]|[1-9]?[0-9])?(\.\d*)?)|-?180(\.[0]*)?
This will also restrict the decimal values being > 0 for both +- 90′ and +- 180