the followings :
// comments
/******
comments
*******/
is it possible to have a regex for them ?
the followings :
// comments
/******
comments
*******/
is it possible to have a regex for them ?
As the comments say, its not possible to strip comments in a correct way with regexes. But maybe its still enough for you to use the following regular expressions:
^\s*//.*$
/\*.*?\*/
You can do this with a simple hack. Select Extended
mode and then replace all \r\n
with a character/character-sequence that does not occur in your file and that which will match .*
. Now change back to Regular Expression
mode and apply the regular expression (given by morja) to do your replace. Now replace back the special character/character-sequence with \r\n
.
@Mohammad Currently you cannot do this (match multiline) in Notepad++.
This is because matching newlines is possible in Extended search mode, and regular expressions are available in Regexp search mode.
You could however combine different steps and do what you want as pointed by other answers.
The easiest solution is not to use regex from Notepad++, you sould only export as rtf (plugins --> nppexport --> export to RTF)
then open with Microsoft Word or other that support format searching, so with that feature you can search and replace the green values only.
I hope it helps.