Quote:
Originally Posted by anicetan
I don't think the minus sign is a metacharacter, so you don't need to escape it.
^[A-Za-z0-9\.-_]{3,32}$
Good luck 
|
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}$