I have the following dataset
DATA EXAMPLE1;
INPUT Names $char30.;
DATALINES;
AARON RAY, MD INC
AARON,RAY MD (1371927)
RAY,AARON,MD
;
run;
I want to delete all characters after 'MD'. Expecting below output
Names Want_names
AARON RAY, MD INC AARON RAY, MD
AARON,RAY MD (1371927) AARON,RAY MD
RAY,AARON,MD RAY,AARON,MD
Any suggestions?
Thanks