Hi, @nagoor-meerasa-mohammed, and All,
OK ! So, here is the road map :
Copy all the File 1.txt contents in, let’s say, a file named File 3.txt
Add a separation line of, at least, three = signs
Append all the File 2.txt contents, after the separation line
Open the Replace dialog ( Ctrl + F )
SEARCH (?-s)\D\K(\d+):(?=(?s:.+^=+\R.*^\1\x20)(.+))|^===+(?s).+
REPLACE ?1\2
Tick the Wrap around option
Select the Regular expression search mode
Click only on the Replace All button ( Do not use the Replace button ! )
Close the Replace dialog ( Esc )
Save the File 3.txt modifications ( Ctrl + S )
Here is an example where I copied your File 1.txt text, twice, then the separation line ===== and, finally your File 2.txt text
3:1.428238e-001):4.577779e-002,64:9.743924e-002):7.427767e-002):2.922571e-002):3.206583e-002,((((4:7.719304e-002,5:7.767254e-002):9.925778e-002,92:1.697033e-001):2.906791e-002,(7:1.281314e-001,62:1.351362e-001):2.747034e-002):1.246730e-002,((6:9.872749e-002,7:7.750112e-002):3.270381e-002,(2:1.533366e-001,91:1.316264e-001):2.139538e-002):5.698094e-002):3.332409e-002):5.389512e-002,(2:2.990773e-001,((((((6:7.144297e-002,((5:3.452890e-002,1:7.746965e-003)
3:1.428238e-001):4.577779e-002,64:9.743924e-002):7.427767e-002):2.922571e-002):3.206583e-002,((((4:7.719304e-002,5:7.767254e-002):9.925778e-002,92:1.697033e-001):2.906791e-002,(7:1.281314e-001,62:1.351362e-001):2.747034e-002):1.246730e-002,((6:9.872749e-002,7:7.750112e-002):3.270381e-002,(2:1.533366e-001,91:1.316264e-001):2.139538e-002):5.698094e-002):3.332409e-002):5.389512e-002,(2:2.990773e-001,((((((6:7.144297e-002,((5:3.452890e-002,1:7.746965e-003)
=====
1 Phalera_flavescens
2 Ochrogaster_lunifer
3 Hyphantria_cunea
4 Eudocima_salaminia
5 Eudocima_phalonia
6 Grammodes_geometrica
7 Parallelia_stuposa
AFter clicking on the Replace All button, you should get this new text :
Hyphantria_cunea1.428238e-001):4.577779e-002,64:9.743924e-002):7.427767e-002):2.922571e-002):3.206583e-002,((((Eudocima_salaminia7.719304e-002,Eudocima_phalonia7.767254e-002):9.925778e-002,92:1.697033e-001):2.906791e-002,(Parallelia_stuposa1.281314e-001,62:1.351362e-001):2.747034e-002):1.246730e-002,((Grammodes_geometrica9.872749e-002,Parallelia_stuposa7.750112e-002):3.270381e-002,(Ochrogaster_lunifer1.533366e-001,91:1.316264e-001):2.139538e-002):5.698094e-002):3.332409e-002):5.389512e-002,(Ochrogaster_lunifer2.990773e-001,((((((Grammodes_geometrica7.144297e-002,((Eudocima_phalonia3.452890e-002,Phalera_flavescens7.746965e-003)
Hyphantria_cunea1.428238e-001):4.577779e-002,64:9.743924e-002):7.427767e-002):2.922571e-002):3.206583e-002,((((Eudocima_salaminia7.719304e-002,Eudocima_phalonia7.767254e-002):9.925778e-002,92:1.697033e-001):2.906791e-002,(Parallelia_stuposa1.281314e-001,62:1.351362e-001):2.747034e-002):1.246730e-002,((Grammodes_geometrica9.872749e-002,Parallelia_stuposa7.750112e-002):3.270381e-002,(Ochrogaster_lunifer1.533366e-001,91:1.316264e-001):2.139538e-002):5.698094e-002):3.332409e-002):5.389512e-002,(Ochrogaster_lunifer2.990773e-001,((((((Grammodes_geometrica7.144297e-002,((Eudocima_phalonia3.452890e-002,Phalera_flavescens7.746965e-003)
Notes :
The File 2.txt list of items, at the end of File 3.txt, has been deleted, too !
Of course, any number followed with a colon, which does not exist in the list, located after the separation line =====, is not replaced at all, in the section before the ===== line
The File 2.txt list of items, at the end of File 3.txt, do not need to be sorted, too !
Best Regards,
guy038