RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 2
Title Test Details Latitude Validation
Expression
^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}
Description
I was inspired by this regexp - Matches a whole number between 1 and 20 inclusively - because it was doing something I could not find elsewhere so this is how I expanded it to validate lat values
Matches
90.0,-90.9,1.0,-23.343342
Non-Matches
90, 91.0, -945.0,-90.3422309
Author Rating: The rating for this expression. Jason Rutberg
Title Test Details Longitude Validation
Expression
^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\.{1}\d{1,6}
Description
Longitude validation (similiar to Latitude Validation) and inspired by the same code
Matches
180.0, -180.0, 98.092391
Non-Matches
181, 180, -98.0923913
Author Rating: The rating for this expression. Jason Rutberg
   Displaying page 1 of 1 pages; Items 1 to 2

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials