in reply to RegEx for Matching paranthesis

Perl is nice: you can solve your problem remaining a beginner in Regexp :)) (just kidding): take a look at Text::Balanced, maybe it can help you.