User: Colin -- 2014-01-13 << 1166 1168 >> |
Hits: 3669 |
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 |