For clarity, the regex expands to the equivalent of:
re = %r{ (?: (?<thing>.+) ){0} (?<thing>.+) }
So, yes, (?<thing>.+) did match. It is just that the first instance didn't match. In Perl, %+ only records the captures of the first instance.
- tye
In reply to Re^4: Regexp not capturing in named subrules (first)
by tye
in thread Regexp not capturing in named subrules
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |