On Apr 3, 1:37 pm, [EMAIL PROTECTED] wrote: > What's the neatest and/or most efficient way of testing if one of a > set of strings (contained in a dictionary, list or similar) is a > sub-string of a given string? > [...]
You could use the Aho-Corasick algorithm <http://en.wikipedia.org/wiki/ Aho-Corasick_algorithm>. I don't know if there's a Python implementation yet. Dennis Benzinger -- http://mail.python.org/mailman/listinfo/python-list