------ art_2936_21147044.1191902281519 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline [snip] ?? > > I agree that for complex cases a regexp is not the solution. A > solution like yours counting parens (or with a stack) should be > preferred way. > > Cheers, > > Jesus. Yep, parsing something with an arbitrarily stacked parentheses is the classic example of something that can't be done with a regex. (Well, assuming you actually care about the nested parens.) ------ art_2936_21147044.1191902281519--