The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am trying to change this to only accept a-z 1-9 ` ^ - _ [ ] | and no spaces.
I found ^[A-Z0-9] which i understand does a-z and 0-9 - but how can i add in those other few characters that i want? thanks in advance |
#2
|
||||
|
||||
![]() Code:
/^([ a-z0-9`\^-_\[\]\|]+)$/i |
#3
|
|||
|
|||
![]()
Thank you.
There appears to be a problem with that. I just tried to sign up as testing-all but it wouldn't accept it. |
#4
|
||||
|
||||
![]()
Try:
Code:
/^[ a-z0-9`\^\-_\[\]\|]+$/i |
#5
|
|||
|
|||
![]()
That doesn't seem to work either. If i use just ^[A-Z0-9] that will allow letters, numbers and NO spaces right?
|
#6
|
|||
|
|||
![]()
Shouldn't it have both A-Z and a-z to account for all uppercase and lowercase letters? I've only messed with regular expressions in Python but it seems that it should still be the same.
|
#7
|
||||
|
||||
![]() Quote:
as for the regex. Quite why you would want back ticks, bars and square brackets in usernames is beyond me. is your site called www.easy.to.hack.com? the hyphen should go unescaped at the end, I have no idea if backticks need escaping, or if they or anythig else is being weeded out by vb. /^[ a-z0-9`\^_\[\]\|-]+$/i or /^[ a-z0-9\`\^_\[\]\|-]+$/i are my guesses |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|