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):