Regex to match XML comments
The regex you're looking for would be:
<!--[\s\S\n]*?-->
Explanation:
<!-- All comments must begin with this
[\s\S\n] Any character (. doesn't allow newlines)
* 0 or more of the previous thing ([\s\S\n])
? As few of the previous thing as possible while still matching
--> All comments must end with this
If you have a comment inside a comment this will have issues though:
<!-- Documentation
This program documents itself using comments of the type <!-- -->
-->
Highlighted in bold means a match