I prefer the regex to have ^[a-zA-Z0-9] rather than \W
It's more explicit what is being allowed.