Hello, @maverick-f-16c, @peterjones, @coises, @terry-r, @mark-olson and All,
@maverick-f-16c, I think about a native N++ solution using a regex S/R :
So, let’s suppose you have two files :
File_1.txt
A = 10
CKQ = 20
BYZ = 15
C = 1
D = 7
X = 7
E = 9
File_2.txt
A = 00277789
BYZ = 30
C = 6
d = 12
X = 5
E = 10
F = 25
First, copy the contents of File_1.txt in File_3.txt
Add a new line containing only some @ characters at the very end of File_3.txt
Append the contents of File_2.txt, in File_3.txt right after the line of @ chars
Thus, the contents of File_3.txt should be :
A = 10
CKQ = 20
BYZ = 15
C = 1
D = 7
X = 7
E = 9
@@@@@@@@@@@
A = 00277789
BYZ = 30
C = 6
d = 12
X = 5
E = 10
F = 25
Now, open the Replace dialog ( Ctrl + H )
Un-tick all box options
SEARCH (?i-s)^(([A-Z]+)[\x20\t].+?)\d+$(?=(?s).+^@+.+^\2[\x20\t].+?(\d+)$)|(?s)^@+.+
REPLACE \1\3
Select the Regular expression search mode
Click once on the Replace All button ( or several times on the Replace button to understand the logic ! )
After the Replace All action, you should get this text :
A = 00277789
CKQ = 20
BYZ = 30
C = 6
D = 12
X = 5
E = 10
Is this output OK for you ?
Notes :
My regex first searches for any range of letters, whatever its case, followed with a space or a tabulation char and with some digits at the end of curent line
Then, it tries to find, AFTER the line of @@@@@@@, the same list of letters, whatever its case, beginning the line
In this case, it replaces, in the corresponding line, BEFORE the @@@@@@@ chars, the present digits with the digits found in the last part !
Best Regards,
guy038