I am looking for a specific regular expression that will help me identify if my string contains only 2 types of characters –
The regular expression that I need should identify if a specific string contains only the brackets characters ( )
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.
You can use a character class:
Note that this does not check if the parentheses are in balanced pairs.