I want to remove HTML comments from an html text
heading some text <-- con --> more text
You shouldn't ignore Carriage return.
re.sub("()", "", s, flags=re.DOTALL)