I have two lists of files with slightly different naming conventions
files1 = {"DTideal_circ_def=000um_astX=000um_astY=410um.png","DTideal_circ_def=050um_defX=000um_defY=010um.png"}
files2={"DT120_blur7_Defoc=000um_AstigX=000um_AstigY=410um.png",
"DT120_blur7_Defoc=000um_AstigX=460um_AstigY=310um.png",
"DT120_blur7_Defoc=000um_AstigX=460um_AstigY=360um.png",
"DT120_blur7_Defoc=000um_AstigX=460um_AstigY=410um.png",
"DT120_blur7_Defoc=000um_AstigX=460um_AstigY=460um.png",
"DT120_blur7_Defoc=050um_AstigX=000um_AstigY=010um.png",
"DT120_blur7_Defoc=050um_AstigX=000um_AstigY=060um.png",
"DT120_blur7_Defoc=050um_AstigX=000um_AstigY=110um.png",
"DT120_blur7_Defoc=050um_AstigX=000um_AstigY=160um.png",
"DT120_blur7_Defoc=050um_AstigX=000um_AstigY=210um.png",
"DT120_blur7_Defoc=050um_AstigX=000um_AstigY=260um.png"}
I need to create pairs of files the paremeters of which are matching, i.e. to get
{{"DTideal_circ_def=000um_astX=000um_astY=410um.png","DT120_blur7_Defoc=000um_AstigX=000um_AstigY=410um.png"},
{"DTideal_circ_def=050um_defX=000um_defY=010um.png","DT120_blur7_Defoc=050um_AstigX=000um_AstigY=010um.png"}}