01-22-2010, 01:11 AM
|
|
Confirmed User
Join Date: Mar 2008
Posts: 8,960
|
Quote:
Originally Posted by borked
If the minus sign isn't a metacharacter, then what is it doing in eg A-Z and a-z and 0-9???
Of course it needs escaping
^[A-Za-z0-9\.\-_ ]{3,32}$
or shorter still
^[\w\.\-]{3,32}$
note with this though, \w as it's recognising word characters, will allow tabs and line breaks, not just white space.... if you don't want them, negate them:
^[\w\.\-^\t^\n]{3,32}$
|
Good info. Thanks, 
|
|
|