User: michal -- 2014-04-29 << 1196 1198 >> |
Hits: 3481 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
I have 250 .txt articles. Each article looks like in sample text. I want to take and insert first line of each article excluding: "2014" or sometimes "2013" and [title] tags - randomly between first 3-5 words. Also randomly insert only "word1 word2 word3" together 2 times. Keep in mind that "basewords" are sometimes 2 or sometimes 4 words long. |
Input Sample: |
[title]basewords word1 word2 word3 2014[/title] [img]doesnt matter[img] content content content content content content content content (around 500 words each file) |
Output Sample: |
[title]basewords word1 word2 word3 2014[/title] [img]doesnt matter[img] conten content content[b]basewords word1 word2 word3[b] content content content [...] content word1 word2 word3 content content content [...] content content word1 word2 word3 content content content content |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-h open 'replace' dialogue * set 'replace with pattern' to: * click 'advanced' tab, set 'run following for each matched unit' to: 2. click 'batch' button open "Batch Runner" dialogue 3. drag multiple files to "Batch Runner" window 4. click "Batch Replace", done. Please make backup in advance, to avoid operation error. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |