fastest way for humongous regexp search?

Tim Arnold tiarno at sas.com
Tue Nov 2 10:31:47 EST 2004


"Istvan Albert" <ialbert at mailblocks.com> wrote in message
news:sZqdnc_PlckB8BvcRVn-pw at giganews.com...
> Tim Arnold wrote:
>
> > I've got a list of 1000 common misspellings, and I'd like to check a set
of
> > text files for those misspellings.
>
> A much simpler way would be to just store these misspellings as a
dictionary
> (or set), read and split each line into words, then check whether each
> of words is in the set.
>
> Istvan

Thanks, I didn't know that would be faster.
But I need to match against the misspellings in a case-insensitive
way--that's the reason I'm using the regular expressions.

--Tim





More information about the Python-list mailing list