Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1239.Advanced search and replace -- How to replace string in the Nth file with the Nth strings from a list?

User: yong -- 2014-09-01          << 1238  1240 >>
Hits: 3047
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I have some text file, I want to bulk replace some words, please see the text sample.
Input Sample:
Replace the word group "one two" with the list word: one aaa, one bbb, one ccc 
 
text file 1: 
 
blah blah blah blah blah one two blah blah blah blah 
 
text file 2: 
blah blah blah blah blah one two blah blah 
blah blah 
 
text file 3: 
blah blah blah blah blah one two blah blah blah blah
Output Sample:
text file 1: 
 
blah blah blah blah blah one aaa blah blah blah blah 
 
text file 2: 
blah blah blah blah blah one bbb blah blah blah blah blah blah 
 
text file 3: 
blah blah blah blah blah one ccc blah blah blah blah blah blah
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. prepare a file d:\test\word.txt contain the word list in each line, like: 
one aaa 
one bbb 
one ccc 
... 
2. open "Tools->Batch Runner" menu 
3. drag multiple files from windows file browser and drop to "Batch Runner" window 
4. click "Fast Replace" button 
5. click "add" to add new rules 
* set "search" to:  
* set "replace" to:  
* click "ok" 
6. make sure "regexp" option are checked, and click "start", done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to replace a string in one text file with random words from another file? (64%)
How to replace the same words in text files with different strings? (63%)
How to replace strings in hundreds of html files in one action? (61%)
How can I replace the 3rd lines of many files to a fixed string? (61%)
How to replace alt text with string from title tag? (60%)
How to replace strings in multiple files with a global  increasing ID? (60%)
How to batch rename last part of filenames to the strings from a file? (59%)
How to replace strings in multiple files based on the search/replace mapping file? (59%)

Check Demo of Advanced search and replace
Keywords:
regex  regexp  aaa  nth  strings  two  pare  rules  word list  test  make word list  aaa bbb  two words  add string to multiple files windows  replace word with words from list  strings in a line  replace some string  search and replace multiple strings in multiple files