John Machin wrote:
Uh-huh ... try this, then:
http://hkn.eecs.berkeley.edu/~dyoo/python/ahocorasick/
You could use this to find the "Str" cases and the prefixes of the
"re" cases (which seem to be no more complicated than 'foo.*bar.*zot')
and use something slower like Python's re to search the remainder of
the line for 'bar.*zot'.
If it was just strings, then sure...with regexps it might be possible to
make it work, but it doesn't sound particularly maintainable. I will
stick with my shell script until python gets a regexp engine of
equivalent performance.
Kris
--
http://mail.python.org/mailman/listinfo/python-list