[Python-ideas] Matching multiple regex patterns simultaneously

M.-A. Lemburg mal at egenix.com
Thu Mar 4 01:21:07 CET 2010


Stefan Behnel wrote:
> M.-A. Lemburg, 02.03.2010 23:09:
>> If you only need to search for a finite set of words, there are few
>> good algorithms for this:
>>
>> http://en.wikipedia.org/wiki/Aho-Corasick_algorithm
>>   * used in Unix fgrep
>>   * Python implementation:
>>     http://hkn.eecs.berkeley.edu/~dyoo/python/ahocorasick/
>>
>> http://en.wikipedia.org/wiki/Rabin-Karp_string_search_algorithm#Rabin.E2.80.93Karp_and_multiple_pattern_search
>>
>>   * uses hashing
> 
> ... and acora:
> 
> http://pypi.python.org/pypi/acora

Nice :-)

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Mar 04 2010)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/



More information about the Python-ideas mailing list