Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

867.Regular expression replace -- How to keep all specified words in an article and remove rest words?

User: editor -- 2011-10-07          << 866  868 >>
Hits: 2943
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
How to keep all specified words in an article and remove rest words?
Input Sample:
..... word1 ...... verb1 ...... word2 .... 
.... word2 ...... verb2 ...... word3 ..... 
.... word2 ...... verb3 ..... word4 .... 
.... word2 ...... verb4 ....... word5 
Output Sample:
word1 verb1 word2 
word2 verb2 word3 
word2 verb3 word4 
word2 verb4 word5 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file 
2. ctrl-h open 'replace' dialog 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
* uncheck option of 'print unmatched units' 
3. click 'replace', done. 
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Similar Examples:
How to search specified pattern in a text file and remove spaces in it? (63%)
How to keep the key words and delete all the other words? (61%)
How to replace one specified word with a sequence of words from a file? (60%)
How to replace all specified symbols with dot in specified range? (58%)
How to replace words in a text file only if they are whole words? (57%)
How to batch extract specified words from one txt file with specified name? (56%)
How to replace specified occurrance of some string to a list of words? (56%)
How to caplitalize all specified words between ">" and first "#"? (55%)

Check Demo of Regular expression replace
Keywords:
verb  specified words  keep  unmatched  unmatch  regular expression  expression  specified  print  regular  keep words  remove specified  remove words  search text file with words in  text file remove all  remove all text  search expression  open print file