From 5a90e7b727bd224bea05bbdafe7031c3f4356dc0 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sat, 18 Mar 2023 03:03:06 +0000 Subject: fix more twiddly variations of QMs --- parsers/QMs.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'parsers/QMs.py') diff --git a/parsers/QMs.py b/parsers/QMs.py index 5a0be79..56c97e4 100644 --- a/parsers/QMs.py +++ b/parsers/QMs.py @@ -147,20 +147,32 @@ def parse_KH_QMs(kh, inputFile, ticked): #
C1997-161-27 A
Sib: pitch at end of Fuzzy Logic [Paradox Rift - continues] [sep.fuzzy.13] line += 1 res = re.search( - r"name=\"[CB](?P\d*)-(?P\d*)-(?P\d*).*\s*(?P[ABCDX?V])
(?P.*)(\[(?P.*)\])?", + r"name=\"[CB](?P\d*)-(?P\d*)-(?P\d*).*\s*(?P[ABCDX?V])
(?P[^[]*)(\[\s*(?P[^]]*)\s*\])?\s*(\[\s*(?P[^]]*)\s*\])?", dataline, ) if res: res = res.groupdict() year = int(res["year"]) + completion = res["completion"] + station_name = res["station_name"] + if not completion and station_name: + if station_name.startswith("