Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?:90|(?:[0-8]{0,1}[0-9]))[°\s](?:[0-5]{0,1}[0-9])['\s](?:[0-5]{0,1}[0-9](?:[.,]\d{1,5})?)["\s]{0,1}[NS]\s?,?\s?(?:180|(?:1[0-7]{1}[0-9]{1})|(?:0?[0-9]{1}[0-9]{1})|(?:[0-9]{1}))[°\s](?:[0-5]{0,1}[0-9])['\s](?:[0-5]{0,1}[0-9](?:[.,]\d{1,5})?)["\s]{0,1}[EW]
/
g

Description

This regEx tries to detect geo coordinates in the dms (degree, minutes, seconds) format. Any help is appreciated

Submitted by anonymous - 3 years ago