in reply to Re: Efficient regex matching with qr//; Can I do better?
in thread Efficient regex matching with qr//; Can I do better?
But yes, seeing what kind of patterns these are would provide some clues. If they are literal strings, for instance, it may be better to not do the qr// but instead do
(the latter bit just to preserve the \b checks).if (0 <= index($text, $pattern) && $text =~ /\b$pattern\b/) { }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Efficient regex matching with qr//; Can I do better?
by ikegami (Patriarch) on Jul 11, 2008 at 06:15 UTC |