Matching words

merge-requests/30/head
Bob Mottram 2021-07-29 14:19:59 +01:00
parent 8aac65c3c4
commit fca261806f
1 changed files with 3 additions and 3 deletions

View File

@ -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: