in reply to Quantified named captures in 5.10
The pre-5.10 version looks like this (I've added a term to show the singularness of captures.
With the numeric "names" for captures, it seems natural that there's only one slot. Adding a + to the capture does not add more capturing group instances to the system. There's one actual set of parentheses, so there's one actual capture.my $str = 'Digits: 123689 abc'; if ($str =~ m{Digits: \s* (\d)+ \s+ (\w+) }x) { print 'Digits: ', $1, ' ', $2, $/; } __OUTPUT__ Digits: 9 abc
--
[ e d @ h a l l e y . c c ]
|
---|