data a;
input var $20.;
cards;
,1,,,13,,5
,1,,,,,
,,,,,,
1,,,,,17
;
run;
data b;
set a;
length item1 $20.;
if prxmatch("/,/",var) then item1=prxchange("s/,?(.+?)(,+)(.+?)(,+)(.+?)/$1,$3,$5/",-1,var);
if prxmatch("/,,,/",item1) then item1=prxchange("s/(.+)(,,,)(.+)/$1,$3/",-1,item1);
if prxmatch("/,\s/",item1) then item1=prxchange("s/(.+),\s/$1/",-1,item1);
if item1=',' then item1='';
run;