in reply to Re^4: XML data extraction
in thread XML data extraction

As I said, you'll need to show more than one example input, and also "mostly two sets of parens" is still not specific enough. Please see Re: How to ask better questions using Test::More and sample data and following that example post a new question in Seekers of Perl Wisdom, and we should be able to help.