From 5836dbe90891efe104a51e9915cd01c8d11f29bf Mon Sep 17 00:00:00 2001 From: konstantin Date: Tue, 30 Jul 2024 07:16:51 +0200 Subject: [PATCH] Make file name pattern matching case insensitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit außerordentlicheVeröffenltichung should match Außerordentliche Veröffentlichtung relates to https://github.com/Hochfrequenz/kohlrahbi/pull/382 and is probably relaed to https://github.com/Hochfrequenz/migmose/issues/122 --- src/migmose/parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migmose/parsing.py b/src/migmose/parsing.py index 10efe11..ffd5871 100644 --- a/src/migmose/parsing.py +++ b/src/migmose/parsing.py @@ -145,7 +145,7 @@ def _extract_document_version(path: Path) -> str: r"MIG(?:Strom|Gas)?-?informatorischeLesefassung?(.*?)" r"(?:_|KonsolidierteLesefassung|-AußerordentlicheVeröffentlichung)" ) - matches = re.search(pattern, document_str) + matches = re.search(pattern, document_str, re.IGNORECASE) if matches: document_version = matches.group(1) if document_version == "":