Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

943.Text file parser -- How to extract all blocks that contain specified strings like "A"?

User: William -- 2012-05-02          << 942  944 >>
Hits: 1884
Type: Text file parser   
Search all Text file parser examples
I have a text file containing text in the form:

<block=text comes here

<block=text comes here

I'd like to save all blocks containing a set string of text in a new file.
Input Sample:
<block=this text contains string "A"

<block=this text contains string "B"

<block=this text contains string "A"
Output Sample:
<block=this text contains string "A"

<block=this text contains string "A"
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open 'replace' dialogue
* set 'search for pattern' to:

* set 'replace with pattern' to:

* uncheck option of 'print unmatched unit'
* set 'if=>' to:

3. click 'start', done.
4. ctrl-s save to file.

Screenshot 1:  Replace_Window

Similar Examples:
How to extract all lines that contain specified words or phrases? (75%)
How to extract all sentences that contain specified words? (74%)
How to extract all records that contains specified field values? (71%)
How to extract sentences that contain specified words from UTF8 file? (70%)
How to extract all lines containing words in specified file? (69%)
How to extract all links that contain imprint from a webpage? (68%)
How to remove all lines that contain some specific strings in a text file? (68%)
How to extract all sentences that contain special keyword from multiple articles? (67%)

Check Demo of Text file parser
blocks  block  matches  strings  containing  unmatched  string  unmatch  specified  print  open source extract text blocks  blocks of text  extract strings  extract string in text file  extract string  extract text to string  string extract  extract all text containing