I have a Regex which contains the following .Is this suitable restricting the user only to enter alphabets and do not allow numbers ,special characters such as (‘,@#$%^&*())
^[a-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.
Yes, but it also does not allow accented characters and other non-ASCII letters (ä, à, ñ, ß and many others).
^\p{L}+$is an alternative for this scenario, if your regex engine is Unicode-aware.