Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1441.Advanced search and replace -- How to replace specified lines with each line from a file respectively?

User: komiii -- 2019-08-05          << 1440  1442 >>
Hits: 2140
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How do I replace the line of keywords in the dictionary in order by looking for the key. 
 
Replace all the \"How to\" lines in Texe1 with the sentences in the dictionary,in order.The lines in the dictionary will replace the \"How to\" lines in Text1 one by one.
Input Sample:
Dictionary: 
 
1.aaadfdsafdfd 
2.bbbbdfadfad 
3.ddddfdafdfaa 
4.eeeeeeeeeadfadf 
5.bbbbdfadfadf 
............ 
..... 
n........... 
 
 
 
Text 1: 
 
1.How to make lines with specified string 
2.How to remove all lines but the second 
3.................. 
4................. 
5.change midi to mp3 in many files? 
6................ 
7.How to batch insert file name in the text 
8.replacing large amount or size of files? 
................ 
............... 
n...........
Output Sample:
Text 2: 
1.aaadfdsafdfd 
2.bbbbdfadfad 
3.................. 
4................. 
5.change midi to mp3 in many files? 
6................ 
3.ddddfdafdfaa 
8.replacing large amount or size of files? 
................ 
............... 
n..........
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume the list file is d:\test\list.txt 
 
1. ctrl-o open file to replace 
2. ctrl-h open 'replace' dialog 
* set 'replace unit' to 'Line' 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
3. click 'replace', done. 
 
Note: please use double backslash as folder separator

Screenshot 1:  Replace_Window


Similar Examples:
How do I replace specified lines with each line from a file? (84%)
How to replace specific spaces into comma in each line of text file? (69%)
How to replace specific column with specific rule in csv file? (65%)
How to shuffle specified lines in multiple text files? (63%)
How to extract specified lines in different section of text file? (62%)
How to extract specified lines in multiple excel(csv) files? (62%)
How to replace the User-Defined lines of A text from B text? (61%)
How to move the specified line to the end in multiple files? (61%)

Check Demo of Advanced search and replace
Keywords:
sentences  keywords  diction  keyword  sentence  dictionary  backslash  slash  dic  double  use key  double lines  replace sentences  keywords replace  search folder and list  line order  order line  replace by list