Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

62.Advanced search and replace -- How to remove/delete all words other than 'this','that' and 'how' in a file?

User: Editor -- 2008-05-06          << 61  63 >>
Hits: 3324
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to remove all words other than 'this','that' and 'how' in a file?
Input Sample:
This is line1 
That is line2 
How many lines  
That's all 
End of text
Output Sample:
This That How That 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1.press ctrl-o to open source file  
2.press ctrl-h to open replace dialog, set as follows:  
In 'Replace' page:  
* Search for pattern: 
 
Note: @ means ignore case, | means 'or' 
* Uncheck 'Print unmatch Unit' 
Note: uncheck it means do not copy unmatch text to output.  
* Replace with pattern 
 
3. click 'Replace' Button, ok 
 
Note: in newer version, you can check option of 'ignore cases' instead of adding '@' behind
Download Script:  scripts/62.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove/delete all symbols in a text file? (63%)
How to remove/delete all characters except number and spaces in a text file? (60%)
How to remove/delete all blank lines in a text file? (58%)
How to remove all text between 'start' and 'end' for multiple files? (57%)
How to remove/delete all text between '1:' and 'user:'? (57%)
How to remove/delete all commas from comma separated numbers in a text file (56%)
How to remove/delete text after </html> in many html files? (56%)
How to remove/delete all lines containing '123456'? (56%)

Check Demo of Advanced search and replace
Keywords:
tea  nth  adding  ignore case  ignore  copy  delete all  case  unmatch  version  words behind  search and copy and replace file  remove words  copy text  replace ignore  output remove  copy file  copy a file