Is there something wrong with the (obvious?) just surround both groups with another outer set of parens (which then shifts the numerics down by one)? Should work with a named mark as well.
my $re = qr/(?<whole_enchilada> (?<Letter>\w+) (?<Digit>\s*\d+\s*)* )/ +x;
Edit: NVM, misread what was being asked. You could wrap the second set of parens outside the quantifier I believe but that's not going to preserve the separate matches. ENOCAFFEINE . . .
Edit 2: Playing with %- and friends I'm not finding anything obvious. The other suggestion about using minor ebil like embedded code pushing to an array sounds like the most promising.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: How do I reference repeated capture groups?
by Fletch
in thread How do I reference repeated capture groups?
by TIOOWTDI
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |