Update plain regex patterns to std lib re

This commit is contained in:
Veronica Berglyd Olsen
2024-09-22 16:37:45 +02:00
parent cb8933b493
commit d3799bc30a
2 changed files with 32 additions and 26 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ class nwRegEx:
FMT_SC = r"(?i)(?<!\\)(\[[\/\!]?(?:b|i|s|u|m|sup|sub)\])"
FMT_SV = r"(?i)(?<!\\)(\[(?:footnote):)(.+?)(?<!\\)(\])"
RX_WORDS = compile(r"\b([^\s\-\+\/–—\[\]:]+)\b", UNICODE)
RX_WORDS = compile(r"\b[^\s\-\+\/–—\[\]:]+\b", UNICODE)
RX_FMT_SC = compile(r"(?i)(?<!\\)(\[[\/\!]?(?:b|i|s|u|m|sup|sub)\])", UNICODE)
RX_FMT_SV = compile(r"(?i)(?<!\\)(\[(?:footnote):)(.+?)(?<!\\)(\])", UNICODE)