From 1936c5c37c12b39a057d8d5ee6e48cf584e28cab Mon Sep 17 00:00:00 2001 From: Jirawat I Date: Wed, 3 Nov 2021 16:39:12 +0700 Subject: [PATCH] Patch #197 Lat / Long matches incorrectly https://github.com/bee-san/pyWhat/issues/197#issuecomment-958700434 --- pywhat/Data/regex.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index 25a67b0..ff8db8f 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -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, @@ -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" + ] } }, {