in reply to Quantified named captures in 5.10
my $re = qr{ Digits: \s* (?:(?<digits> (?:(?<digit>\d) (?{ local @d = (@d, $+{digit}) }) )+ )(?{ $digits = \@d })) }x; 'hello, world, Digits: 123' =~ /$re/ and print "@$digits\n"; [download]