Regular Expressions 101

Community Patterns

Community Library Entry

-3

Regular Expression
PCRE (PHP <7.3)

/
(?<latitude>[-]?[0-8]?[0-9]\.\d+|90\.0+?)(?<delimeter>.)(?<longitude>[-]?1[0-7][0-9]|[0-9]?[0-9]\.\d+|180\.0+?)
/

Description

Tests the string if it does contain valid latitude and longitude parameters

Submitted by Doro - 11 years ago