Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1000.Text file parser -- How to extract all sentences that contain special keyword from multiple articles?

User: editor -- 2012-09-04          << 999  1001 >>
Hits: 2029
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


Similar Examples:
How to extract all sentences that contain specified words? (78%)
How to extract all lines that contain "abc" from multiple files? (76%)
How to extract sentences that contain specified words from UTF8 file? (74%)
How to findout all lines that contain specified words in multiple files? (74%)
How to extract all lines that contain specified words or phrases? (73%)
How to extract all lines that contain words A and B and C? (66%)
How to extract all records that contains specified field values? (64%)
How to extract all english words that preceded by multi-byte characters? (63%)

Check Demo of Text file parser
Keywords:
sentences  english  special  sentence  keyword  key  output to single file  containing  cross line  single  extract sentences containing  extract sentence from files  extract text containing keyword  keyword search and replace all text files  extract sentence  how to replace multiple sentences  search multiple files keyword  containing keyword