Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^\([+|-]*((90|[1-8][0-9]|[0-9])|(([1-8][0-9]|[0-9])\.\d+)|90\.[0]+)\,\s[+|-]*((180|1[0-7][0-9]|[1-9][0-9]|[0-9])|((1[0-7][0-9]|[1-9][0-9]|[0-9])[\.]\d+)|180\.[0]+)\)$
/
g

Description

Detecting Valid Latitude and Longitude Pairs HackerRank

Submitted by anonymous - 7 years ago