mention adjustment to mention_regex

pull/139/head
Aevann 2023-03-15 03:51:11 +02:00
parent b48a7dd129
commit 35c0b5c1eb
1 changed files with 2 additions and 2 deletions

View File

@ -8,8 +8,8 @@ from .config.const import *
valid_username_chars = 'a-zA-Z0-9_\-'
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A)
mention_regex = re.compile('@([a-zA-Z0-9_\-]{1,30})(?!([^<]*<\/(code|pre|a)>|[^`]*`))', flags=re.A)
group_mention_regex = re.compile('!([a-z0-9_\-]{3,25})(?!([^<]*<\/(code|pre|a)>|[^`]*`))', flags=re.A|re.I)
mention_regex = re.compile('(?<!\/)@([a-zA-Z0-9_\-]{1,30})(?!([^<]*<\/(code|pre|a)>|[^`]*`))', flags=re.A)
group_mention_regex = re.compile('(?<!\/)!([a-z0-9_\-]{3,25})(?!([^<]*<\/(code|pre|a)>|[^`]*`))', flags=re.A|re.I)
everyone_regex = re.compile('(^|\s|>)!(everyone)(?!([^<]*<\/(code|pre|a)>|[^`]*`))', flags=re.A)