diff --git a/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py b/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py index 8b3a4a03e..f62c8ba67 100644 --- a/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py +++ b/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py @@ -347,13 +347,21 @@ for fnm in ("../all.3d", "../alltracks.3d"): for l in file3d: match = re.match(r''' ^ #start - (MOVE|LINE|NODE) #command type + (MOVE|LINE|NODE) #one of three command types \s+(-?[0-9.]+) #X-co-ord \s+(-?[0-9.]+) #Y-co-ord \s+(-?[0-9.]+) #altitude - (?:\s+\[(\S*)\])* #node name inside [] - (?:\s+(.*))* #all optional flags - $ #till the end of the line + (?: #grouping without saving result - for station name + \s+ #at least one space + \[ #opening [ + (\S*) #the station name we want to save + \] #closing ] + )? #end of optional station name group + (?: #grouping without saving result - for flags + \s+ #at least one space separating from [station] + (.*) #all the flags, including spaces + )? #end of optional flags group + $ #end of the line ''', l, re.VERBOSE) if not match: continue