data have;
input x $40.;
cards;
Sara.Ph.D
Ali PHD
Bran MD
;
data want;
set have;
want=prxchange('s/\b(phd|ph\.d|md)\b//i',-1,x);
run;
Special offer for SAS Communities members
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.