[Israel.pm] how do I handle unknown number of captures ?
Yuval Yaari
yuval at windax.com
Wed Jan 28 02:43:57 PST 2004
Hmmm... I'd either use:
while ($string =~ /(Ab)/g) {
print $1, "\n";
}
Or:
my @found = ($string =~ /(Ab)/g);
Or `perldoc perlre` :]
--Yuval
Uri Itscowits wrote:
>#!/usr/bin/perl to all,
>
>I want to run a capturing regex, with an unknown number of captures as a result,
> how do I refer to the resulting list?
>
>for example :
>regex like: /(Ab)/g
>
>
>TIA
>_______________________________________________
>Perl mailing list
>Perl at perl.org.il
>http://www.perl.org.il/mailman/listinfo/perl
>
>YAPC::Israel::2004
>http://www.perl.org.il/YAPC/2004/
>
>
>
>
More information about the Perl
mailing list