| User: editor -- 2008-11-25 << 297 299 >> |
| Hits: 526 |
| 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 |