Skip to content

Commit

Permalink
Merge pull request #226 from nodtem66/patch-197
Browse files Browse the repository at this point in the history
Patch #197 Lat / Long matches incorrectly
  • Loading branch information
bee-san committed Nov 7, 2021
2 parents 6162ace + 1936c5c commit 5b29165
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pywhat/Data/regex.json
Expand Up @@ -1477,7 +1477,7 @@
},
{
"Name": "Latitude & Longitude Coordinates",
"Regex": "(?i)^((?:(?:N|W|S|E)\\s?\\d+\\s?\\u00B0?\\s?\\d+\\.?\\d*\\s?\\'?\\s?\\d*\\.?\\,?\\d*?\"?\\s?){1,2}|(?:\\d+\\s?\\u00B0\\s?\\d+\\s?\\'\\s?\\d+\\.?\\,?\\d{0,}?\"\\s?(?:N|W|S|E)\\s?){1,2}|(?:[-+]?(?:[0-8]?\\d+\\.\\d{4,}|90(?:\\.0+)?),\\s*[-+]?(?:180(?:\\.0+)?|(?:(?:1[0-7]\\d)|(?:[1-9]?\\d))(?:\\.\\d+)?)))$",
"Regex": "(?i)^((?:(?:N|W|S|E)\\s?\\d+\\s?\\u00B0\\s?\\d+\\.?\\d*\\s?\\'?\\s?\\d*\\.?\\,?\\d*?\\\"?\\s?){1,2}|(?:\\d+\\s?\\u00B0\\s?\\d+\\s?\\'?\\s?\\d+\\.?\\,?\\d{0,}?\\\"?\\s?(?:N|W|S|E)\\s?){1,2}|(?:[-+]?(?:[0-8]?\\d+\\.\\d{4,}|90(?:\\.0+)?),\\s*[-+]?(?:180(?:\\.0+)?|(?:(?:1[0-7]\\d)|(?:[1-9]?\\d))(?:\\.\\d+)?))|(?:@\\d+\\.\\d{4,},\\d+.\\d{4,},\\d+z))$",
"plural_name": true,
"Description": null,
"Rarity": 0.7,
Expand All @@ -1494,9 +1494,16 @@
"77\u00b0 30' 29.9988\" N",
"N 32\u00b0 53.733 W 096\u00b0 48.358",
"41\u00b024'12.2\" N 2\u00b010'26.5\" E",
"40.741895,-73.989308"
"40.741895,-73.989308",
"@13.923404,101.3395163,17z"
],
"Invalid": []
"Invalid": [
"123N",
"E123",
"e12.23123",
"n12.1211,e1.12331",
"123.34,78.8"
]
}
},
{
Expand Down

0 comments on commit 5b29165

Please sign in to comment.