I am looking for a Regex to match comments in XML documents:
<root>
<!--
match this
-->
<but>not this</but>
<!--
and also this
-->
</root>
I've tried <!--[^(-->)]*-->
, which only matches single line comments, and <!--[\s\S\n]*-->
which matches non-commented nodes as well.