Could someone explain why captures (named and un-named) don't seem to work in named regexes? I'm expecting that It is something I'm doing wrong, but if so, I don't see it. Here is captured text from the raku repl as my short-form example.
> my $s = '16.01.2020 09:18 286';
> my $dReg = /^(\d**2)\.(\d**2)\.(\d**4)/;
> $s ~~ /<$dReg>/;
「16.01.2020」
> if $s ~~ /<$dReg>/ { say $0 }
Nil
> my $dReg1 = /^$<day> = (\d**2)\.$<mon> = (\d**2)\.$<year> = (\d**4)/;
/^$<day> = (\d**2)\.$<mon> = (\d**2)\.$<year> = (\d**4)/
> $s ~~ /<$dReg1>/;
「16.01.2020」
> if $s ~~ /<$dReg1>/ { say $<day> }
Nil
> if $s ~~ /^$<day> = (\d**2)\.$<mon> = (\d**2)\.$<year> = (\d**4)/ { say $<day> }
「16」
> if $s ~~ /^(\d**2)\.(\d**2)\.(\d**4)/ { say $0 }
「16」