Notepad++ obviously recognizes all comments as such. Is there a way to simply delete all?
Edit: Stat-R\'s bookmark method has helped greatly, not on
In the Find & Replace Dialog, put the following regex and adjust the search options as depicted.
/\*.*?\*/
Replace with: (empty)
Select Mode: Regular Expression AND .(dot) matches newline
This should remove all your C style comments spanned across lines.
Warning to all using Stat-R's solution:
This method will remove lines of code if formatted like this:
echo "hello"; //This comment will be detected
Following his method, the entire line will be removed. Therefore make sure to go through and make these comments, their own line before doing this method.
Star-R and Chris Mirno Answer are also Correct and Good.
But For Line Comment:
//.*?(?=\r?$)
Explanation:
//
will be the Starting Position
.*?
Will be any character
(?=\r?$)
will search to the end of the line (as it is required in line comment)
Note: But Still check each of the line because for example if your code contains soap format like
//www.w3.org/2001/XMLSchema-instance\x2......");
it will capture this line because the starting is //
and it goes to end of the line so watch out for this :)