How to extract string between two specified characters and end of line?

Hi All,

I am trying to extract a string between two characters in a file and then look up that string in a separate file. E.g. first file is ABC.txt and its contents are

abc.$$Date
xyz.$$Year.dat
abc.xyz.$$Unit

I want to extract Date in the first line , Year in the second line and Unit in the third line and look it up in a separate file xyz.txt. I tried sed command but missing something. Any help is appreciated.