Skip to content

Commit

Permalink
common regex fixup: google link may also contain plus sign
Browse files Browse the repository at this point in the history
  • Loading branch information
papko26 committed Dec 2, 2024
1 parent f8150cc commit 232143e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/gtw.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def extract_coordinates_with_regex(url):
logger.debug("fastrrack: it is a 'places' or 'dir' link, parsing skipped")
return None
# Regex pattern to match latitude and longitude pairs
pattern = r"(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)"
pattern = r"(-?\+?\d+(\.\d+)?),\s*(-?\+?\d+(\.\d+)?)"
match = re.search(pattern, url)
if match:
# Extract latitude and longitude from groups
Expand Down

0 comments on commit 232143e

Please sign in to comment.