Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1301.Advanced search and replace -- How to extract from a file according to content of another file?

User: Dilip -- 2015-04-25          << 1300  1302 >>
Hits: 1337
Type: Advanced search and replace   
Search all Advanced search and replace examples
I have two tab separated text files. Both the files have first two columns that are
identical but one is the master data whose Column 3,4,5 (tab seperated needs to be
appended. If no values are found, then inlcude deletelater

File 1.txt:
Brand SKU
Audi 007
Benz 009

Brand SKU Specifications Descriptions Title
Audi 007 Alloy Wheel Sports Model Audi-8 S[yder
Input Sample:
File 1.txt:
Brand SKU
Audi  007
Benz  009

Brand SKU Specifications Descriptions Title
Audi  007 Alloy Wheel    Sports Model Audi-8 S[yder
Output Sample:
Brand SKU Specifications Descriptions
Audi  007 Alloy Wheel    Sports Model
Audi-8 S[yder
Bence 009  na             na    na
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
put master.txt under d:\test\ folder
1. ctrl-o open 1.txt
2. ctrl-h open replace dialogue
* set 'replace unit' to 'Line"
* set "replace with pattern" to:

3. click "advanced" tab
* set "run following at the beginning of replace" to:

4. click "replace", done.

Screenshot 1:  Replace_Window

Screenshot 2:  Replace_Advanced_Window

Similar Examples:
How to update values in xml file according to values from another xml? (67%)
How to set column N according to content of column A in csv file? (66%)
How to split a file into two parts according to the content of line? (63%)
How to extract and join first words from adjacent lines? (60%)
How to extract all upper cases words from a text file? (60%)
How to make a batch replacement according to a text mapping file? (60%)
How to fill in one xml file with elements from another xml file? (59%)
How to extract titles from many html files into a txt file? (59%)

Check Demo of Advanced search and replace
identical  first two  seperate  mode  grep  tel  desc  scalar  found  specific  split columns from text files  split text according to content  split text file according to content  identical files  extract data from text file  split columns to files  txt file split columns  extract data