Hallo everyone,

I need help with regular expressions. I need make regular expressions for three formats of GPS coordinates.

Formats of GPS coordinates:

  • AA°BB'CC.DD"N
  • AA°BB'"N
  • AA°"N


May someone help me?

Maybe I have regular expression for first format but I'm not sure.

This is the regular expression:
Code:
(\\d+)(°)(\\d+)(')([+-]?\\d*\\.\\d+)(?![-+0-9\\.])(\")(?:N|S|W|E)
Is the regular expression good?