User: Aaron -- 2013-07-06 << 1095 1097 >> |
Hits: 3417 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
I would like a script that replaces bracket delimited text in one file with different bracket delimited text from another file. Replacements should be done in sequence with an option for random inserts. |
Input Sample: |
The tall man met his friend on the street. (How are you today, Bob?) (Not bad,) Bob answered. (How about you?) (Things could be better, I guess.) The tall man looked away. Replacement file list: (Did you hear the news about Ralph?) (No,) (I thought he moved away.) (He was in an accident.) |
Output Sample: |
Sequential Output: The tall man met his friend on the street. (Did you hear the news about Ralph?) (No,) Bob answered. (I thought he moved away.) (He was in an accident.) The tall man looked away. Random Output Example: The tall man met his friend on the street. (He was in an accident.) (I thought he moved away.) Bob answered. (Did you hear the news about Ralph?) (No,) The tall man looked away. |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
assume your list file is d:\test\word_list.txt 1. ctrl-o open text file 2. ctrl-h open 'replace' dialogue * set 'search for pattern' to: * set 'replace with pattern' to: * click 'advanced' tab, set 'run following at the beginning of replace' to: 3. click 'replace', done. Note: 1. you should use double backslash like d:\\test\\word_list.txt 2. if you want to replace them randomly, you can change 'replace with pattern' to: |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |