Possible Duplicate:
Can regular expressions be used to match nested patterns?
How do I use regular expressions to search for a pair of opening and closing brackets with arbitrary number of nested brackets inside it e.g.
(...(...(...(...) ...) ...) ...)
Each opening bracket must be matched by a closing bracket. And the number of nested opening-closing pair is arbitrary. Other alphanumeric characters may appear inside the brackets.
If you really want to use RegEx to do it(i'm not sure it's the good way),
you can loop until this regex \([^\(\)]*\)
returns nothing,
and for each times you get something you have to remove the result in the initial and loop again...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With