>> I really dont care if the expression is optimal. So the goal is
    >> something like:

    >> vowel_regexp = oneOf("a aa i ii u uu".split())  # yielding r'(aa|a|uu|
    >> u|ii|i)'

    >> Is there a public module available for this purpose?

Check Ka-Ping Yee's rxb module:

    http://lfw.org/python/

Needs translating from the old regex module to the current re module, but it
shouldn't take a lot of effort.  You can find regex docs in old
distributions (probably through 2.1 or 2.2?).  Also, check PyPI to see if
someone has already updated rxb for use with re.

Skip

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to