Regular Expressions: large amount of or's

Francis Girard francis.girard at
Tue Mar 1 22:13:00 CET 2005

Le mardi 1 Mars 2005 22:04, André Søreng a écrit :
> That is not exactly what I want. It should discover if some of
> the predefined words appear as substrings, not only as equal
> words. For instance, after matching "word2sgjoisejfisaword1yguyg", word2
> and word1 should be detected.


A lexer producing a DFA like the one in pyggy (see might be what you're looking for.


Francis Girard

More information about the Python-list mailing list