Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1167.Text file parser -- How to batch extract specified words from one txt file with specified name?

User: Colin -- 2014-01-13          << 1166  1168 >>
Hits: 1313
Type: Text file parser   
Search all Text file parser examples
Description:
How to batch extract specified words from one txt file with specified name?
There are 2 files, list.txt and phoneme.txt.

For each line in phoneme.txt:

For example, 'ai', save all words in the word list starting with ai into the file ai.txt, so ai.txt would contain:
air
aid
Input Sample:
list.txt containing thousands of words:
apple
air
aid
beg
bat
beat
cat
car
cook
...

phonemes.txt contain a list of phonemes:
a
b
d
ai
ch
Output Sample:
a.txt:
apple
air
aid
============
b.txt:
beg
bat
beat
============
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open "phoneme.txt"
2. ctrl-h open "replace" dialogue
* set "replace unit" to "Line"
* set "replace with pattern" to:

* click "advanced" tab:
* set "run following at the beginning of replace" to:

* set "run following for each matched unit" to:

3. click "replace", done.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to batch extract specified lines from a text file? (74%)
How to create some copies of 2 files with specified names? (64%)
How to replace all specified symbols with dot in specified range? (64%)
How to extract the certain line that follow the specified line? (63%)
How to extract all specified date format from a text file? (62%)
How to extract all specified links from a html file? (60%)
How to extract all upper cases words from a text file? (60%)
How to batch rename files with the first line of file content as new file name? (60%)

Check Demo of Text file parser
Keywords:
phone  starting with  starting  grep  specified words  word list  test  batch extrac  batch extract  at the beginning  batch split words  to extract the list of line from txt file  batch extract line contain test  extract line beginning with  word split file batch  line starting with  replace starting with  replace starting