Community Patterns

Community Library Entry

0

Regular Expression
Created·2016-11-29 07:58
Flavor·PCRE (Legacy)

/
^(-?[1-8]?\d(?:\.\d{1,18})?|90(?:\.0{1,18})?),\s*?(-?(?:1[0-7]|[1-9])?\d(?:\.\d{1,18})?|180(?:\.0{1,18})?)$
/
gmi
Open regex in editor

Description

GPS coords from GMpas are as:

  • 47.338388, 0.990228
  • -47.338388, -0.990228

This regex will extract 47.338388 in $1 and 0.990228 in $2 .

Submitted by freMea