User: editor -- 2012-09-04 << 999 1001 >> |
Hits: 4381 |
Type: Text file parser |
Search all Text file parser examples |
Description: |
How to extract all sentences that contain special keyword from multiple articles? There are some text files containing English articles, each sentence is ended with . or ! or ?, how to extract all sentences that contain keyword such as "replace" and output these sentences into a txt file. |
Input Sample: |
How to search and replace a with b? Firstly, search for a. Secondly, replace a with b. That's all. |
Output Sample: |
How to search and replace a with b? Secondly, replace a with b. |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. open "Tools->Batch Runner" window 2. drag multiple text files from "windows file manager" to "batch runner" window 3. click "fast replace" button to open "fast replace" dialogue 4. click "add" to add new rule * set "search" to: * set "replace" to: * click "ok" 5. make sure "reg exp" and "cross line" and "extract" options are checked 6. click "start", and select "output to single file", done. |
Screenshot 1: Fast_Replace_Window |