Merge pull request #3464 from yoff/UnicodeEscape

Python: Handle more escapes in regexes
This commit is contained in:
Taus
2020-06-10 15:47:09 +02:00
committed by GitHub
2 changed files with 32 additions and 1 deletions

View File

@@ -139,3 +139,10 @@ re.compile(r'(?:(?P<n1>^(?:|x)))')
#Potentially mis-parsed character set
re.compile(r"\[(?P<txt>[^[]*)\]\((?P<uri>[^)]*)")
#Allow unicode in raw strings
re.compile(r"[\U00010000-\U0010FFFF]")
re.compile(r"[\u0000-\uFFFF]")
#Allow unicode names
re.compile(r"[\N{degree sign}\N{EM DASH}]")