Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Searching regexp to get out DEG and DMS coordinates of a string.
- So i want:
- One regular expression, which searches for DEG or DMS and gives me the coordinates. The string has weather DEG or DMS, never both.
- Strings can look like this:
- DEG: "...BREITE\n48.9358\nLAENGE\n15.0300\nMETER von..."
- or
- DMS: "...BREITE\n45 20'20N\nLAENGE\n12 20'20E\nMETER von..."
- Current use RegExp to get out DEG is "/[+-]?\d+\.\d+/".
- Result shall be like (php):
- DEG: array([0] => "48.9358", [1] => "15.0300")
- DMS: array([0] => "45 20'20N", [1] => "12 20'20E")
Advertisement
Add Comment
Please, Sign In to add comment