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