Click here to Skip to main content
15,791,675 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If the data inside of the "(" + ")" contains data that is alphabet and included brackets, then it is true.

However if it contain data that is any number, included brackets, then it will be false.

I don't know how to solve it in relation to including brackets.
By reviewing the code, the selection does not include the brackets

Thank you!

sdf (ff)
answer: true

dddd (335g) ddd
answer: false

sdf(f344f) 21ff
answer: false

sdf(dd) 433dd
answer: true

What I have tried:

I have coded the regex code and I also have made some research but unfortunatly I still cannot find the answer or part of the answer.
Updated 13-Mar-16 16:50pm
Garth J Lancaster 13-Mar-16 20:25pm    
you havnt posted any relevant code - what expression(s) are you using for example ? in general, you would include brackets in your regular expression by escaping them - eg


would match any word character [A-Za-z0-9_] zero or more times and include brackets ... there's a nice regex cheat-sheet here and there are also tools online to test regexes for one example

1 solution

Try this:

Learn: The 30 Minute Regex Tutorial[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900