in reply to die in regexp
For complex parsings, it's easier to use Perl 6 Rules than simple regexes... Fortunally, this rules are implemented in Perl 5 already... See Pugs::Compiler::Rule... It's really fantastic.