You can convert your KEY format to regular expression format.
dt1 is Table1 and dt2 is Table2.
dt1<<new column("KEY_reg",character,formula(substitute(:KEY,"|","","?","[A-Z0-9]")));
I tried to use the update command but not succesful.
dt2<< update(with(dt1),match columns(regex(:KEY,:KEY_reg ))) //[NOT WORKING]
Here are manual way to do the job.
dt1<<new column("KEY_reg",character,formula(substitute(:KEY,"|","","?","[A-Z0-9]")));
dt2<<new column("DATA");
for(r=1,r<=ncol(dt1),r++,
r1 = dt2<<get rows where(not(is missing(regex(:KEY, dt1[r,"KEY_reg"]))));
dt2[r1,"DATA"]=dt1[r,"DATA"];
);
Thanks.