104
rated 0 times
[
106]
[
2]
/ answers: 1 / hits: 43487
/ 12 Years ago, thu, april 26, 2012, 12:00:00
I tried different ways to escape the parentheses using regex in JavaScript but I still can't make it work.
This is the string:
abc(blah (blah) blah()...).def(blah() (blah).. () ...)
I want this to be detected:
abc().def()
Using this code, it returns false.
str.match(/abc([^)]*).def([^)]*)/i);
Can you please tell me why my regex is not working?
More From » regex