Apr 30, 2014, 4:25 AM
Post #2 of 4
If you allow nested parentheses as in your example, this is getting possibly beyond what single regexes can do, especially if there may be 3, 4 or more paren nesting levels. You should probably settle for a primitive parser that can maintain a counter of how many opening unclosed parens it has seen.
Re: [PerlBeginner31] Remove text within brackets and return the remaining string
[In reply to]
Without nested parens, the regex could be something like this: