I am having trouble forming regular expression containing all alphanumeric characters and one or two specific characters, such us _ or -.
This expression works for all alphanumeric characters /^[0-9a-zA-Z]+$/.
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.
Try this:
If you enter the dash sign “-” at a position where it can be interpreted as a range such as _- it would mean any characters matching _ or above in the ascii table.