in reply to Re^3: Find number of short words in long word
in thread Find number of short words in long word
>perl -wMstrict -le "my $string = 'aBrabRabrAbra'; my $pattern = qr{ brabra }xmsi; my $count =()= $string =~ m{ (?= ($pattern)) }xmsg; print $count; my @matches = $string =~ m{ (?= ($pattern)) }xmsg; print qq{@matches}; " 3 BrabRa bRabrA brAbra
|
|---|