in reply to Help!!! How to find duplicates?

Regexp::Common will match up the parentheses for you via Regexp::Common::balanced.