Regular Expressions 101

Community Patterns

1...34567...901

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