in reply to Parsing with reg ex

You may want to have a look at Regexp::Common (especially Regexp::Common::balanced) or Text::Balanced if you have to deal with nested parentheses.

Hope this helps, -gjb-