in reply to Re: Regex: Matching around a word(s)
in thread Regex: Matching around a word(s)
is about 46% slower then the pattern match/span solution.my ($text,@words) = @_; my @text = split /\s+/, $text; my @results; for my $t (@text){ for my $w (@words){ push @results if $t eq $w; } }
|
|---|