User: xiaoming -- 2014-06-19 << 1207 1209 >> |
Hits: 2160 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
How to extract all sentences that contain specified words from UTF8 file? |
Input Sample: |
dic file : aaa bbb ccc artical file:(UTF8 encoded 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) 3. click 'replace', done! 4. ctrl-s save to new file. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |