-
Regex Pattern Question
I am tryin to confirm a one word string (nickname) when users sign into my server. the allowed characters should be a-z 0-9 - ^ ~ ` [ ] _ { and }
The pattern I have right now is
(?i:^[a-z0-9_]+\w$)
which works find for alphanumeric with underscores but if I cant figure out how to have it check for the other characters as well i thought adding them into the [] brackets as escape characters would do it but its not working
can anyone help me out here?
-
Actually this SHOULD work.
(?i:^[a-z0-9_\-^~'[\]{}]+\w$)
At least I'm quite sure that it would work in JavaScript.