in reply to Regex Question
Consider Regexp::Common::balanced, Text::Balanced.
Update: Also Parse::RecDescent.
Update: Also Parse::RecDescent.
tybalt89's code is brittle - will break if the closing brace is not the first character, or if any option starts with "object...".
...it is unhealthy to remain near things that are in the process of blowing up. man page for WARP, by Larry Wall
In Section
Seekers of Perl Wisdom