Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

732.Advanced search and replace -- How to extract all sentences that contain specified words?

User: langkong -- 2011-03-03          << 731  733 >>
Hits: 4112
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
how to make a dictionary's example library; 
there are two files : one is words list as dictionary; 
        the other is an artical with many many sentences. 
I wanna append the sentences contain word in the dic to the word. 
 
Thx!
Input Sample:
dic file : 
aaa 
bbb 
ccc 
 
artical file: 
this  is 1st bbb 
this is zzz 
this  is aaa 
this is ccc 
this 2nd bbb 
Output Sample:
out put file : 
aaa=this  is aaa 
bbb=this  is 1st bbb 
bbb=this 2nd bbb 
bbb=this is ccc 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open file dictionary.txt 
2. ctrl-h open replace window 
* set 'replace unit' to 'Line' 
* set 'replace with pattern' to: 
 
* click "Advanced Page": 
set 'run following at the beginning of replace' to: 
(assume file sentence.txt is in d:\test\ folder) 
 
* set 'run following for each matched unit' to: 
 
3. click 'replace', done! 
4. ctrl-s save to new file.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to extract sentences that contain specified words from UTF8 file? (87%)
How to extract all lines that contain specific words in a file? (83%)
How to extract all lines that contain specified words or phrases? (83%)
How to extract all records that contains specified field values? (79%)
How to extract random lines containing specified words? (78%)
How to extract all sentences that contain special keyword from multiple articles? (78%)
How to extract all blocks that contain specified strings like "A"? (76%)
How to extract all lines that contain words in a list? (75%)

Check Demo of Advanced search and replace
Keywords:
rar  sentences  grep  dictionary  diction  sentence  two files  pages  dic  specified words  sentences contain the word replace  files dictionary  make word list  replace sentences  two words  extract all words  search and replace files in in a list of  list of words