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 = ''
|
pattern = ''
|
||||||
for word in reservedNames:
|
for word in reservedNames:
|
||||||
if pattern:
|
if pattern:
|
||||||
pattern += '|' + word
|
pattern += '(?!.*\b' + word + '\b)'
|
||||||
else:
|
else:
|
||||||
pattern = '(?!(' + word
|
pattern = '^(?!.*\b' + word + '\b)'
|
||||||
return pattern + '))'
|
return pattern + '.*$'
|
||||||
|
|
||||||
|
|
||||||
def _isReservedName(nickname: str) -> bool:
|
def _isReservedName(nickname: str) -> bool:
|
||||||
|
|
Loading…
Reference in New Issue