my $string = 'cesi'; while($istr =~ /(\S*$string\S*)/gi) { print "$1\n"; }