Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1395.Advanced search and replace -- How to find out all specified keywords from a file?

User: editor -- 2017-06-29          << 1394  1396 >>
Hits: 2907
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to find out all specified keywords from a file? 
if any of words in input.txt can be found in word_list.txt, then put it in output.txt
Input Sample:
word_list.txt: 
word1 
word3 
word5 
word7 
 
input.txt: 
word1 word2 word3 word4
Output Sample:
output.txt 
word1 
word3 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume word_list.txt is in d:\test\ 
 
1. ctrl-o open text file input.txt 
2. ctrl-h open 'replace' dialogue 
* set 'replace with pattern' to: 
 
* click 'advanced' tab: 
set 'run following at the beginning of replace' to: 
 
 
3. click 'replace', done. 
4. ctrl-s save to output.txt

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to findout all lines that contain specified words in multiple files? (69%)
How to extract lines containg specified words from many files? (67%)
How to remove lines containing specified words in a text file? (66%)
How to extract all specified links from a html file? (66%)
How to add bold tag for some specified keywords in multiple html files? (65%)
How to extract all specified date format from a text file? (64%)
How to count the occurrance of some specified words in many files? (64%)
How to sort all lines of text by specified keyword? (64%)

Check Demo of Advanced search and replace
Keywords:
keywords  grep  keyword  found  key  find  test  input  beginning  at the beginning  text find and split file  find text and output  output found text  find 2 words  find tab  output found  keywords replace  join with output file