On Sat, Aug 23, 2008 at 02:27:10AM -0700, Carl Mäsak wrote: > To match whatever the prior successful regex matched, use: > > / <prior> / > > r30466: > $ ./perl6 -e 'my $s = "hello"; say $s ~~ /ll/; say $s ~~ /ll/' # works > ll > ll > $ ./perl6 -e 'my $s = "hello"; say $s ~~ /ll/; say $s ~~ / <prior> /' > # not implemented > ll > Unable to find regex 'prior' > Null PMC access in invoke() > [...] > > This feature request is perhaps more accurately classified as > pertaining to PGE. Please re-tag as needed.
...correct -- C<< <prior> >> is not yet implemented. I'm not certain if it belongs in PGE or in Rakudo... I'm guessing that <prior> needs to refer to the "prior successful regex" in a statement-level context, as opposed to a regex context. For example, if we interpret S05 literally then in the regex / <foo> <prior> / it's pretty clear that C<< <foo> >> is the prior successful regex matched, and I think that's not what is intended by C<< <prior> >>. (If it is what is intended, then C<< <prior> >> becomes much simpler. :-) Pm