Skip to content

Commit

Permalink
common regex fixup: group size fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
papko26 committed Dec 2, 2024
1 parent 232143e commit 4cdf3ce
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 4cdf3ce

Please sign in to comment.