remove all comments from your source code

while browsing the logs from this site I found that a lot of people are looking for a way to strip comments from their respective sources in visual studio.

Well here would be the solution for C/C++ sources at least (in visual studio regular expression dialect).

replace_comments

So just fire up your CTRL+H, search and replace dialog and strip away. Maybe you will find it wise to create a copy of your project beforehand in case I missed something.

(/\*(\n|.)@\*/)|(//.*$)

If you are interested in the visual studio specific dialect of regular expressions please have a look at this msdn reference.


About this entry