The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Help with usernames, PCRE-type regular expressions
Need a little help here, trying to limit usernames for new registrations.
I can see this in admincp vB options, but it's either too much filtering or not enough: Code:
You may require the username to match a PCRE-type regular expression. (Do not start or end the expression with an escape character) Examples: ^[A-Z]+$ - Characters from A-Z only ^[A-Z ]+$ - Characters from A-Z including space ^[A-Z0-9 ]+$ - Alphanumeric characters including space ^((?!&#\d+;)[\x20-\x7E])+$ - ASCII characters from 32-127 See PHP.net for more information on regular expressions. Any help on what this syntax would be? Also... And if you know how... Preferably no "repeat" periods/underscore/hyphen/spaces. i.e., "--BESTUSEREVER-- ___ -- 123" Better yet, limit to two total periods, underscores, hyphens, spaces I don't want any more users trying to use screwball usernames full of ASCII. Or even overusing what is allowable non-letter/non-number. Thanks. |
#2
|
||||
|
||||
Um, maybe:
^[A-Z0-9\._- ]+$ Really not sure exactly. I just added & and # to my list of illegal usernames. |
#3
|
||||
|
||||
Brilliant idea.
I chronicled my findings on this issue at http://www.digitalFAQ.com/forum/show...scii-2823.html And yours was the one that worked best. Thanks. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|