http://www.perlmonks.org?node_id=474214


in reply to pattern matching with brackets

The "easy" way is to use: Regexp::Common::balanced have a look at "perldoc -q nesting" as well for more information on this FAQ

-enlil