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: 444
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 all records that contains specified field values? (79%)
How to extract all blocks that contain specified strings like "A"? (76%)
How to extract all lines that contain words A and B and C? (75%)
How to filter out all web pages that does not contain specified words? (73%)
How to extract all lines that contain "abc" from multiple files? (70%)
How to findout all lines that contain specified words in multiple files? (69%)
How to sort all lines of text by specified keyword? (67%)
How to extract all lines that has no leading spaces? (66%)

Check Demo of Advanced search and replace
Keywords:
sentences  sentence  grep  two files  diction  dictionary  pages  dic  led  test  sentences contain the word replace  files dictionary  two words  extract all words  extract words  files that contain  extract and save to file  extract word