The passage from perlre is:
The numbered variables ($1, $2, $3, etc.) and the related punctuation set ($+, $&, $`, $', and $^N) are all dynamically scoped until the end of the enclosing block or until the next successful match, whichever comes first.
So you can only get at the last captured repeated group from outside the regex this way: the earlier captures get overwritten when repeatedly matching the repeated sub-pattern to get an overall match.
&mdash Arien
In reply to Re: Capturing brackets within a repeat group
by Arien
in thread Capturing brackets within a repeat group
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |