in reply to How to capture quantified repeats?

Is there NO way to capture all the matches to a numerically quantified subexpression?

Of course there is:

use v6; if "abc" ~~ /(.)+/{ say $0.join(", "); }

In Perl 6, quantifying a capturing group or atom just results in an array of Match objects.

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: How to capture quantified repeats?
by whatever (Initiate) on Sep 23, 2010 at 14:35 UTC
    Thanks. Not sure whether Perl 6 is an option, but I'll take a look.