This regular expression checks for alphabetic, numeric and basic symbols:
/^[a-zA-Z0-9 :,.-\s\?\!()]+$/
I need to add the “;” character, but how can I do this, can’t find how to escape that one \; is not working.
Thanks for help 😉
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.
Update:
Just noticed as pointed out by @Tim Pietzcker, you don’t need to escape
?and!but-needs escapting since it creates ranges:There is no need escapting it in that character class, add it directly: