I'm searching a way to replace all html comments from a string like browser does. (multilined and unclosed)
For example, I actually use /(<\!--[\s\S]*?-->)/gim
but if the html comment is unclosed, it does not replace it.
Normally, if the comment tag is not closed, comment tag gets everything after open tag...
Is there a way to adapt the regexp (or any other regexp) to do the stuff ? (in JavaScript)