Find then use found to search second file for replacement
Posted: Thu Sep 21, 2006 2:09 pm
Hi,
I am a new usr and have a particularly dfficult proble,
I have two files which have a common field between them. I wish to search the first file for a term then use that term to search the second file for the replacement line.
example text:
First file:
58code_86D
58code_88C
etc
Second file:
POWER_UP,CODE,086D,2941
STRT0,CODE,088C,2960
Thus in the first line of the first file the text 58code_86D would be found.
The characters following "_" would be used to search the second file.
This would find the following "POWER_UP,CODE,086D,2941" .
This text would replace the text found in the first file.
Regexes would find both terms but I cannot work out whether the first found text can be passed to a variable that can be used to searc a second file.
Can this be done?
Colin Close
I am a new usr and have a particularly dfficult proble,
I have two files which have a common field between them. I wish to search the first file for a term then use that term to search the second file for the replacement line.
example text:
First file:
58code_86D
58code_88C
etc
Second file:
POWER_UP,CODE,086D,2941
STRT0,CODE,088C,2960
Thus in the first line of the first file the text 58code_86D would be found.
The characters following "_" would be used to search the second file.
This would find the following "POWER_UP,CODE,086D,2941" .
This text would replace the text found in the first file.
Regexes would find both terms but I cannot work out whether the first found text can be passed to a variable that can be used to searc a second file.
Can this be done?
Colin Close