I want a regular expression which ALLOWS only this:
letter a-z
case insensitive
allows underscores
allows any nrs
How should this be written?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That would be
if I’m not mistaken (As it turns out, it depends: In PHP the meaning of
\wchanges with the locale that’s currently in effect). You can use a more explicit form to nail it down:I use it in context, add start-of-string and end-of-string anchors and a quantifier that defines how many characters you will allow: