Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

298.Advanced search and replace -- How to replace all words "NAME" in a file to different names listed in another file in sequence?

User: editor -- 2008-11-25          << 297  299 >>
Hits: 1877
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to replace all words "NAME" in a file to different names listed in another file in sequence?
Input Sample:
FILE1:
***** NAME ******* NAME ********
*** NAME ***********
*** NAME ********* ...

FILE2:
name1
name2
name3
name4
...
Output Sample:
FILE1:
***** name1 ******* name2 ********
*** name3 ***********
*** name4 ********* ...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. Load file2.txt into system:
1) ctrl-o open file2.txt
2) ctrl-h open replace dialog
set "Replace Unit" to "Line"
* click "Advanced" page:
set "run following at the beginning of replace" to:

set "run following for each matched unit" to: 

3) click "Replace" button, done!

2. make replace to file1.txt
1) ctrl-o open file1.txt
2) ctrl-h open replace dialog
set "Search for pattern" to: 

set "Replace with pattern" to: 

3) click "Replace", done!
Download Script:  scripts/298.rst.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Screenshot 3:  Replace_Window


Similar Examples:
How to replace strings in one file with words from another file sequentially? (63%)
How to replace all the word 'TEMPLATE' with each word in a dictionary file in sequence? (63%)
How to replace the same words in text files with different strings? (61%)
How to replace the quoted text with lines from another file? (57%)
How to parse all the fields in different segment from a text file? (56%)
How to replace the all word "test" with the first word in same line? (56%)
How to replace a string in one text file with random words from another file? (55%)
How to replace some text with a random line from another file? (54%)

Check Demo of Advanced search and replace
Keywords:
logs  different names  system  toc  pages  another file  names  values  clear  sequence  listed words of names  replace with a sequence of words  different words  replace another  replace file names  file names  replace in sequence  replace sequence