On 2012-02-13 14:48, lina wrote:
$mystring3="abacadeusagaka35";if($mystring =~ m/(a.+)/g){ print $1,"\n"; } Hi, I wonder how to print the "abacad" out?
I assume you are looking for /((?:a.)+)/. perl -Mstrict -wle ' my $s = shift; print $1 while $s =~ /((?:a.)+)/g; ' abacadeusagaka35 abacad agaka3 perl -Mstrict -wle ' my $s = shift; print for $s =~ /(?:a.)+/g; ' abacadeusagaka35 abacad agaka3 -- Ruud -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
