Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^(\d+)°(\d+)[′'](\d*\.?\d*)[″"']*(\d*)\s*[NEWS]?$
/
s

Description

extract numbers from DMS (degrees, minutes, seconds).

33°28′17″ N ----> 33 / 28 / 17

Submitted by anonymous - 2 years ago