diff --git a/cleanbasestation.py b/cleanbasestation.py index 562ceaf..ca1b73e 100644 --- a/cleanbasestation.py +++ b/cleanbasestation.py @@ -74,15 +74,22 @@ SUBSTITUTIONS = { RE_SUBSTITUTIONS = [ + # "AS.350-B-1" -> AS 350 B1" [re.compile(r'\bAS.?350.?B.?1'), 'AS 350 B1'], [re.compile(r'\bAS.?350.?B.?2'), 'AS 350 B2'], [re.compile(r'\bAS.?350.?B.?3'), 'AS 350 B3'], + # "AS.350" -> "AS 350" + [re.compile(r'\bAS.?350'), 'AS 350'], + # "Notar" -> NOTAR + [re.compile(r'\bnotar\b', re.IGNORECASE), 'NOTAR'] ] def do_re_substitutions(s): new_s = s for regex, replacement in RE_SUBSTITUTIONS: new_s = regex.sub(replacement, new_s) + # if s != new_s: + # print([s, new_s]) return new_s def contains_upper_and_lower(s):