data have;
x='555555555';
y=prxchange('s/(\d{3,3})(\d{2,2})(\d{4,4})/$1-$2-$3/',-1,x);
run;
Thanks, Jag
Register Today!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.