Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(\+|\-)?((180)|(1[0-7]\d|[0]?\d\d|[0]?\d))\s*°\s*(([1-5]\d|[0]?\d)(\.\d+)?\s*\')\s*(w|W|e|E)?
/
g

Description

Regex to detect Degrees Minutes in coordinate system WGS84

Submitted by Rafael Zujur - 8 years ago