Regular Expressions 101

  • PCRE (Legacy)
  • Match
0

Regular Expression

/
([+-])?(\d\d)(?:(:?)|\*)([0-5]\d)(?:(?:(\3)|\')((?:[0-5]\d)(?:\.\d+)?))?([NS])?\/([+-])?([01]\d\d)\3([0-5]\d)(?:\3((?:[0-5]\d)(?:\.\d+)?))?([EW])?\b
/
g

Description

Lat long in format matching the following: DDMM/DDDMM DDMMSS/DDDMMSS DDMMSS.S/DDDMMSS.S

With or without NSEW, colons or +- in front.

Submitted by Anonymous