In sublime & VS Code when you enter find and replace (CTRL + H on windows, I think CMD + H on mac?) there's a toggle switch with .*
on it, This will enable regex searching which when enabled, Will allow you to use these snippets
Remove erronous comments that prevent you from commenting out a block of HTML code. For instance a block like this would prevent you from commenting out anything after it because the existing comment will interrupt the new comment tags that will surround the content;
<div class="foo">
<li class="bar">Baz</li>
</div>
<!-- ./foo -->
This snippet will remove any and all HTML Comments in a document - Use with care. The additional brackets surrounding it may or may not be required, Doesn't seem to matter either way
(<!--(.*)-->)
Remove empty lines that would be left behind by running the comment removal regex, They're both annoying and time consuming to remove, Regex to the rescue! This will search for lines that have a carriage return or a new line character at the very start of them and nothing after that. This will remove all blank lines from a document, Against use with care.
^[\n\r]+