[Israel.pm] run many regexes

Pinkhas Nisanov pinkhas at nisanov.com
Fri May 2 17:01:01 EEST 2008


On Thu, May 1, 2008 at 6:48 PM, Gaal Yahas <gaal at forum2.org> wrote:
> Do you need sophisticated captures, or is there always the same amount
>  of positionals (or do you just need to know whether you matched or
>  not)?

It's simple string ( many strings ) match, I thought use "index" instead of
regex, that means to normalize regex strings and search string ( bring all
to lower case, remove multi spaces to one space, ... ) and match substring
by "index".

>
>  Make sure you're using 5.10. Alternatively, try Regexp::Optimizer.

I use 5.8.8, is there difference between 5.8.8 and 5.10?


>  Precompile your regexps with qr// and store the results in a wide
>  enough scope that you don't recompute them.

sure, I precompile my regexes ( qr// ) and store them in array,
then map this array on content string.


thanks
Pinkhas Nisanov


More information about the Perl mailing list