while ( my $text =~ m/ ( .{0,25} $string.{0,25} ) /gisx ) {