Replace all letters and numeric values into xxxx

This replaces all letters into xxxx.

data a;
q=" Licensed to ICF CONSULTING GROUP, Site 70007867. ";
prx=prxparse("s/[A-Z]/x/io");
call prxchange(prx,-1,q);
drop prx;
run;

proc print;run;

 

This replaces all letters and numeric values into xxx.

data a;
q=" Licensed to ICF CONSULTING GROUP, Site 70007867. ";
prx=prxparse("s/[A-Z,0-9]/x/io");
call prxchange(prx,-1,q);
drop prx;
run;

proc print;run;

 

Thanks, KR.

Leave a Reply