replace linebreak

Achim Domma achim.domma at syynx.de
Thu Jan 23 12:18:04 EST 2003


Hi,

I try to replace line breaks using the re module, but can not figure out how
to do it. If a line does not end with a ')' I want to join it with the
following line. I tried something like

expr = re.compile(r'[^)]\n',re.M)
expr.sub('',file_content))

but it does not change anything.

regards,
Achim






More information about the Python-list mailing list