I want to remove HTML comments from an html text
heading some text <-- con --> more text
html = re.sub(r"", "", html)
re.sub basically find the matching instance and replace with the second arguments. For this case, matches anything start with . The dot and ? means anything, and the \s and \n add the cases of muti line comment.