Remove Visual Studio XML Documentation Comments

less than 1 minute read

I had many XML Documentation comments in my code which were obsolete. These had to be removed. Using a regular expression this is very easy:

[[:space:]]*\/\/\/ .*\n

Note: this matches every line starting with /// in it, so be careful.

This will also remove the whole line, so no empty lines will be left, which is very nice.


Just press CTRL + SHIFT + H, enter the expression in the “find what” field, and check “use regular expressions” under “find options”.

You can select the scope by selecting the right item for the “look in” dropdown.

Then empty the “replace with” field, click “replace all” and you’re done!


Leave a comment