Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

346.Advanced search and replace -- How to replace all the word 'TEMPLATE' with each word in a dictionary file in sequence?

User: editor -- 2009-08-15          << 345  347 >>
Hits: 470
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to replace all the word 'TEMPLATE' with each word in a dictionary file in sequence?
Input Sample:
line1 TEMPLATE xxx
line2 TEMPLATE xxxx
line3 TEMPLATE x
Output Sample:
line1 WORD1 xxx
line2 WORD2 xxxx
line3 WORD3 x
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume dictionary file is word.txt, each line is a word

Load Dictionary:
1. ctrl-o open word.txt file
2. ctrl-h open replace window
* set "Replace Unit" to Line
* click "Advanced" page, set "Run following for each matched Unit" entry:

3. Click "Replace", dictionary file is loaded.

Make Changes:
4. ctrl-o open the text file need to be changed.
5. ctrl-h open "replace" dialog
* fill following into "Search for Pattern":

* fill following into "Replace with Pattern":

6. click "Replace", done.
7. ctrl-s save to output file.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Screenshot 3:  Replace_Window


Similar Examples:
How to replace all words "NAME" in a file to different names listed in another file in sequence? (62%)
How to replace all words PLACE_HOLDER with title of the html file?  (59%)
How to reverse all the words in each line of a csv file? (57%)
How to replace the all word "test" with the first word in same line? (56%)
How to replace all the numbers in a text file to the square value? (55%)
How to replace specified word with increasing binary sequence? (55%)
How to replace all the password field in text file with random chars? (54%)
How do I replace a partial constant in my file with one by one lines in a dictionary file? (54%)

Check Demo of Advanced search and replace
Keywords:
dictionary  diction  dic  template  sequence  seq  sum  tem  run following for each matched unit  load  word sequence  replace in sequence  replace all word  file with word  word and replace  replace word  word replace  replace a word