From b1a13911c2a308783edca8cd2dca2a22f570e4bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 12 May 2025 23:49:51 +0000 Subject: [PATCH] bugfix: redaction regEx --- src/lenaisten/redact.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lenaisten/redact.py b/src/lenaisten/redact.py index 854deac..fe78493 100644 --- a/src/lenaisten/redact.py +++ b/src/lenaisten/redact.py @@ -15,8 +15,8 @@ txt = Path(args.file).read_text() # redaction syntax import re -inlinepat = re.compile(r"\(\(\((([^>]*?):::)?(.*?)\)\)\)", re.MULTILINE|re.DOTALL) -tokenpat = re.compile(r"\[redact(:::(.*?))?\](.*?)\[\/redact\]", re.MULTILINE|re.DOTALL) +inlinepat = re.compile(r"\(\(\((?:(.+?):::)?(.+?)\)\)\)", re.MULTILINE|re.DOTALL) +tokenpat = re.compile(r"\[redact(:::(.+?))?\](.+?)\[\/redact\]", re.MULTILINE|re.DOTALL) # match handling def subredact(match):