Hi! Thanks for this! I'll use that!
I found a solution my question in regexp way too: import re testtext = " minion battalion nation dion sion wion alion" m = re.compile("[^t^l]ion") print m.findall(testtext) I search for all text that not lion and tion. dd Paul McGuire wrote: > It looks like you are trying to de-hyphenate words that have been > broken across line breaks. > > Well, this isn't a regexp solution, it uses pyparsing instead. But > I've added a number of other test cases which may be problematic for an > re. > > -- Paul > -- http://mail.python.org/mailman/listinfo/python-list