I think p6 regexes behave a bit like p5 regexes with the "x" flag turned on, where whitespace can be added in for readability. To have literal whitespace, put quotes around it. Like this (untested)
$x ~~ m/sub ' ' (.*) ' ' \(/;
I think p6 regexes behave a bit like p5 regexes with the "x" flag turned on, where whitespace can be added in for readability. To have literal whitespace, put quotes around it. Like this (untested)
$x ~~ m/sub ' ' (.*) ' ' \(/;