In reply to Ksharp.

Thanks for writing. I put the leading '.*' in because I often use concatenation to create the string dynamically. For example, here is how you can find the variables that match any of three different suffixes by using a loop:

data Suffix;
array suf[3] $ ('tolic', 'status', 'ing'); /* match any of these sufixes */
set Have(keep=Variable);
keep = 0;
do i = 1 to dim(suf);
re = catt('/.*', suf[i], '$/i'); /* '/.*ABC$/i' */
keep = bor(keep, prxmatch(re, right(Variable)) );
end;
if keep;
run;
proc print; var Variable; run;