User: Nan Li -- 2015-05-03 << 1303 1305 >> |
Hits: 2783 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
I want to inquire how to replace the User-Defined lines of A text from B text. For example: In A text, I has Lines No. 2, 7, 12, 17, ..., 3342 [ i.e. 2+N*5 (N=0, 1, 2, 3, 4, 5, ..., 668) ] In B text, I has Lines No. 2, 6, 10, 14, ..., 2930 [ i.e. 2+N*4 (N=0, 1, 2, 3, 4, 5, ..., 732) ] I would like to replace Lines No. 2, 7, 12, 17, ..., 3342 in A text by Lines No. 2, 6, 10, 14, ..., 2930 in B text. Can this software's command complete this task? |
Input Sample: |
A.txt A1 A2 ... A3342 B.txt B1 B2 ... B2930 |
Output Sample: |
A.txt A1 A2 replaced by B2 A3 A4 A5 A6 A7 replaced by B6 A8 A9 ... A3342 replaced by B2674 ... |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
Assume B.txt is in d:\test\ folder 1. ctrl-o open A.txt 2. ctrl-h open "replace" dialogue * set "replace unit" to "Line" * set "unit number filter" to: * set "replace with pattern" to: * click "advanced" tab: * set "run following at the beginning of replace" to: 3. click "replace", done. Note: you need to use double backslash for folder separator like: d:\\test\\b.txt |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |