Subrule matches
regex TOP { <integer> <addop> <integer> {*} } regex integer { \d+ {*} } regex addop { [ '+' | '-' ] {*} } method TOP($/) { say("found an expression ", $/); }
Within a regex, subrules are captured into named components of the match object
continued...