Aevann 2023-08-17 02:08:25 +03:00
parent 2f555e87dd
commit 02e98b6a91
1 changed files with 2 additions and 2 deletions

View File

@ -9,8 +9,8 @@ NOT_IN_CODE_OR_LINKS = '(?!([^<]*<\/(code|pre|a)>|[^`\n]*`|(.|\n)*```))'
valid_username_regex = re.compile("^[\w\-]{3,25}$", flags=re.A)
valid_username_patron_regex = re.compile("^[\w\-]{1,25}$", flags=re.A)
mention_regex = re.compile('(?<![/\w])@([\w\-]{1,30})' + NOT_IN_CODE_OR_LINKS, flags=re.A)
group_mention_regex = re.compile('(?<![/\w])!([\w\-]{3,25})' + NOT_IN_CODE_OR_LINKS, flags=re.A|re.I)
mention_regex = re.compile('(?<![:/\w])@([\w\-]{1,30})' + NOT_IN_CODE_OR_LINKS, flags=re.A)
group_mention_regex = re.compile('(?<![:/\w])!([\w\-]{3,25})' + NOT_IN_CODE_OR_LINKS, flags=re.A|re.I)
everyone_regex = re.compile('(^|\s|>)!(everyone)' + NOT_IN_CODE_OR_LINKS, flags=re.A)