in reply to Parsing... possible w/o too much stress ?
Thus my question: what is the easiest way to handle it?If it's really a simple matter of matching braces then you could indeed use a regex
Check out Re: Graph File Parsing for some regex style parsing, or if you'd prefer to stay away from regexes there's always Text::Balanced.use Regexp::Common; my $str = <<CODE; env { foo { bar {} } } CODE print $str =~ /($RE{balanced}{-parens => '{}'})/; __output__ { foo { bar {} } }
_________
broquaint
|
|---|