mirror of https://gitlab.com/bashrc2/epicyon
Matching words
parent
8aac65c3c4
commit
fca261806f
6
utils.py
6
utils.py
|
@ -1595,10 +1595,10 @@ def getNicknameValidationPattern() -> str:
|
|||
pattern = ''
|
||||
for word in reservedNames:
|
||||
if pattern:
|
||||
pattern += '|' + word
|
||||
pattern += '(?!.*\b' + word + '\b)'
|
||||
else:
|
||||
pattern = '(?!(' + word
|
||||
return pattern + '))'
|
||||
pattern = '^(?!.*\b' + word + '\b)'
|
||||
return pattern + '.*$'
|
||||
|
||||
|
||||
def _isReservedName(nickname: str) -> bool:
|
||||
|
|
Loading…
Reference in New Issue