From 479854809dc3a542ed95774b2433eed9e6da39e7 Mon Sep 17 00:00:00 2001 From: TanguyPcFixe Date: Sun, 26 May 2024 21:46:18 +0200 Subject: [PATCH] fixed regex preventing user from entering a sector with a space in the name in interactive mode --- edsmAround.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/edsmAround.py b/edsmAround.py index 40e0557..d93fffc 100644 --- a/edsmAround.py +++ b/edsmAround.py @@ -8,16 +8,16 @@ import sys #IMPORTANT BITS ###This is the name of the sector you want to search into (Do not use caps!) -sectorName = "Byoomiae" +sectorName = "Phoi Auwsy" ### "weights" to query, beware of big results when searching for lighter systems in more dense area -weightsToQuery = ["a","b","c","d","e"] +weightsToQuery = ["f","g","h"] ### postFix List, modify as needed -#postFixList =["AA-A","BA-A","CL-Y","DL-Y","EG-Y","FG-Y","YE-A","ZE-A"] -postFixList =["WP-X"] +postFixList =["AA-A","BA-A","CL-Y","DL-Y","EG-Y","FG-Y","YE-A","ZE-A"] +#postFixList =["WP-X"] @@ -65,7 +65,7 @@ if (len(sys.argv) > 1): if arg == "-i": print("Starting interactive mode.") print("Please input a sector name with only the first letter capitalized (ex : Byoomiae) ") - sectorNamePattern = re.compile("^[A-Z][a-z]+$") + sectorNamePattern = re.compile("^[A-Z][a-z]+ *[A-Z]*[a-z]*$") possibleSectorName = input() while not sectorNamePattern.match(possibleSectorName): print("The sector name you have entered is incorrect. Please try again")