in reply to Re: Regex: Matching around a word(s)
in thread Regex: Matching around a word(s)

I thought I had responded to this earlier. Actually, I did, but must have mistaken preview for submit (dammit).

BrowserUk stated my thoughts pretty well. As an aside, simply splitting the string and matching the tokens like so
my @text = split /\s+/, $text; my @results; for (@text){ push @results, $1 if m/\b($expr)\b/; }
is pretty slow in comparison to the solution I hit on.


-Lee

perl digital dash (in progress)