On Fri, 24 Feb 2006 07:21:04 -0500, John Zenger <[EMAIL PROTECTED]> wrote:
>Franz Steinhaeusler wrote: >> >> Thank you all for the replies. >> But I still don't have a solution. >> >> Of course with more lines it is possible, >> but it would be fine to have a "oneliner". > >re.sub(r"\s+[\n\r]+", lambda x: x.expand("\g<0>"). \ > lstrip(" \t\f\v"),text).rstrip() > >...where "text" is the unsplit block of text with mysterious line-endings. > >But I think your code is a lot easier to read. :) Hello John, perfect, thank you, but as you said, this is somehow not so easy to grasp. (At least for me). :-) -- Franz Steinhaeusler -- http://mail.python.org/mailman/listinfo/python-list