Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?(DEFINE) (?'longitude'[-+]?(?|180(?>\.0+)?|(?>1[0-7]\d|[1-9]?\d)(?>\.\d+)?)) (?'latitude'[-+]?(?|90(?>\.0+)?|[1-8]?\d(?>\.\d+)?)) (?'polygon'(?>\s*\(\s*(?<X>(?P>longitude))\s+(?<Y>(?P>latitude))(?>\s*,\s*(?P>longitude)\s+(?P>latitude)){2,}\s*,\s*\k<X>\s+\k<Y>\s*\)\s*)) )^POLYGON\s*\((?P>polygon)(?>,(?P>polygon))*\)$
/
X

Description

no description available

Submitted by anonymous - 4 years ago