Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

882.Advanced search and replace -- How to remove all c++ comments that started with //?

User: editor -- 2011-11-05          << 881  883 >>
Hits: 1989
Type: Advanced search and replace   
Search all Advanced search and replace examples
How to remove all c++ comments that started with //?
Input Sample:
//function add 
int add(int a, int b)  
return a+b; //add a and b 

Output Sample:
int add(int a, int b)  
return a+b;  
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source code file 
2. ctrl-h open replace dialogue 
* set 'replace unit' to 'Chars' 
* set 'replace scope' to 'Line' 
* set 'search for pattern' to: 
3. click 'replace', done.

Screenshot 1:  Replace_Window

Similar Examples:
How to remove any comments that from hash mark "#" to line end? (65%)
How to remove all blank lines and lines that started with Name: or Addr:? (63%)
How to remove all lines in file b.txt that appearred in a.txt? (61%)
How to replace all the symbol @ with sequence number that started from 1? (60%)
How to remove all lines that shorter than 10 characters? (60%)
How to remove all line breaks that come after the backslash? (59%)
How to remove all lines that contains more than one word? (59%)
How to delete/remove all lines that appearred more than once? (57%)

Check Demo of Advanced search and replace
comments  code  replace scope  scope  remove all  chars  how to remove  remove  remov  move  remove comments  c remove comments  remove with  remove and replace  search and replace open source  c open source search and replace  replace all  search pattern