Title |
Test
Find
Longitude Validator
|
Expression |
^(\+|-)?(\d\.\d{1,6}|[1-9]\d\.\d{1,6}|1[1-7]\d\.\d{1,6}|180\.0{1,6})$ |
Description |
Matches decimal longitude format like that returned by Google maps. Matches from -180.000000 to +180.000000 with between one and six decimal places. |
Matches |
180.0 -180.000000 +0.123 -34.675421 |
Non-Matches |
09.123 181.345678 -190.000000 |
Author |
Rating:
Nix
|
Source |
|
Your Rating |
|
Title: Doesn't work (edit)
Name: Problem with this code (edit)
Date: 11/24/2010 11:07:07 AM
Comment:
I realize in my last post I listed to 7 decimal places, however, that is not what the problem is because I tested several variations including this one which is only 5 decimal places: -101.51676 (The problem is that it won't let you enter a zero in the second position which is needed for valid values.)
Title: Doesn't work
Name: Problem with this code
Date: 11/24/2010 9:53:43 AM
Comment:
The following regex does not work with the following coordinate: -101.5167627