[EMAIL PROTECTED] wrote: > Frederic Rentsch wrote: > > > >> If you need regexes, why not just reverse-sort your expressions? This >> seems a lot easier and faster than writing another regex compiler. >> Reverse-sorting places the longer ones ahead of the shorter ones. >> > > Unfortunately, not all regular expressions have a fixed match length. > Which is the longest of, for example, /(abc)?def/ and /(def)?ghi/ > depends on the input. > > Lorenzo Gatti > > Oh yes, and my proposal to reverse-sort the targets was in response to the OP who wanted to generate a regex from a bunch of strings. It should work for that.
Frederic -- http://mail.python.org/mailman/listinfo/python-list