diff --git a/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py b/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py index 1d03119ca..8b3a4a03e 100644 --- a/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py +++ b/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py @@ -345,8 +345,16 @@ for fnm in ("../all.3d", "../alltracks.3d"): draw = draws[mapcode] lastx, lasty = 0, 0 for l in file3d: - match = re.match(r'^(MOVE|LINE|NODE)\s+(-?[0-9.]+)\s+(-?[0-9.]+)\s+(-?[0-9.]+)(?:\s+\[(\S*)\])*(?:\s+(.*))*$', l) -#oldregex match = re.match(r'^(MOVE|LINE|NODE)\s+(-?[0-9.]+)\s+(-?[0-9.]+)\s+(-?[0-9.]+)\s+(?:[^[]*\[(.*)\] ?([^]]*)$)?', l) + match = re.match(r''' + ^ #start + (MOVE|LINE|NODE) #command type + \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 + ''', l, re.VERBOSE) if not match: continue