String search vs regexp search

Jeremy Fincher tweedgeezer at hotmail.com
Tue Oct 14 12:32:49 EDT 2003


Duncan Booth <duncan at NOSPAMrcp.co.uk> wrote in message news:<Xns941462CDB5003duncanrcpcouk at 127.0.0.1>...
> Ok, found the code. Regular expression searches do indeed use a form of 
> Boyer-Moore, but not if you are ignoring case. So by specifying 
> re.IGNORECASE the OP got a double hit, not only does the code have to do 
> case insensitive comparisons, but it also has to crawl along looking at 
> every character in the search string instead of skipping most of them.

That's cool!  Where'd you find the code?

Jeremy




More information about the Python-list mailing list