User: Dragan Daniel -- 2012-11-16 << 1024 1026 >> |
Hits: 3312 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
How to replace an random occurrence (only one) of an word with an random line from an external text file ( my interest is to accept as random line an url? |
Input Sample: |
for example I have text source: "My address could be that address and this address." External file will be: <a href="http://www.hhh.com">Visit hhn</a> <a href="http://www.ggg.com">visit ggg</a> |
Output Sample: |
result can be: "My address could be that <a href="http://www.hhh.com">Visit hhn</a> and this address." |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
Assume the external filename is d:\test\2.txt 1. ctrl-o open text file 2. ctrl-h open replace dialogue * set 'replace with pattern' to: * click 'advanced' tab, set 'run following for each matched unit' to: 3. click 'replace', done. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |