Add URL regex pattern

This commit is contained in:
Veronica Berglyd Olsen
2024-10-25 17:49:53 +02:00
parent 439a04c603
commit 37268b873a
3 changed files with 53 additions and 2 deletions
+1
View File
@@ -60,6 +60,7 @@ class nwConst:
class nwRegEx:
URL = r"https?://(?:www\.|(?!www))[\w/()@:%_\+-.~#?&=]+"
WORDS = r"\b[^\s\-\+\/–—\[\]:]+\b"
BREAK = r"(?i)(?<!\\)(\[br\]\n?)"
FMT_EI = r"(?<![\w\\])(_)(?![\s_])(.+?)(?<![\s\\])(\1)(?!\w)"