Every once in a while, my code gets littered with many useless comments, most of them are obsolete lines of code, and some are obsolete "memos to self".
So I was wondering if there's a way to just select a code section, and with some magic key combination or macro, delete all of those.
Thanks.
For searching and replacing code in Visual Studio - Visual Studio has a built in find and replace. Use regular expressions in Visual Studio
The below regular expression will also remove spaces before the comments too.
(\t+|\s+|\r\n)((/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*))