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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find latitude and logitude in decimal format like google-maps us it in links
Expression
^(?<lat>(-?(90|(\d|[1-8]\d)(\.\d{1,6}){0,1})))\,{1}(?<long>(-?(180|(\d|\d\d|1[0-7]\d)(\.\d{1,6}){0,1})))$
Description
Allows extraction of values vio name. tested with dotnet 2003.
Matches
"0,0“, „48.05,11.966667, „90,0“, „-90,-180“
Non-Matches
„05.12345,0“, „90.1234,1“, „1,-180.1“, „0,1.1234567“
Author Rating: The rating for this expression. Juergen Jungwirth
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Great....
Name: Haris
Date: 9/28/2009 2:21:37 AM
Comment:
This RegEx has saved my time. Thank you very much. The only thing I am thinking is why it does not allows zeroz in front of 90 or 180. say 90.00000 or 180.0000. Is this some kind of limitation from google api or something else.


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