Hello Experts,
Today, I'm using the following code to extract rates. I'm wondering if I can create a macro using PRXMATCH to check the values, from 0.50% to 2.70% ?
if (prxmatch("/\b0[,\.]45\s*%/",lb_lg)>0
or prxmatch("/\b0[,\.]45\s*%/",lb_)>0)
or (prxmatch("/\b0[,\.]45\s*%/",lb_lg)>0
or prxmatch("/\b0[,\.]45\s*%/",lb)>0) then
do;
Taux=0.0045;
end;
if (prxmatch("/\b0[,\.]50\s*%/",lb_lg)>0
or prxmatch("/\b0[,\.]50\s*%/",lb)>0)
or (prxmatch("/\b0[,\.]5\s*%/",lb_lg)>0
or prxmatch("/\b0[,\.]5\s*%/",lb)>0) then
do;
Taux=0.005;
end;
if prxmatch("/\b1(\.0\b|\.0\%|\%|\s)/",lb_lg)>0
or prxmatch("/\b1(\.0\b|\.0\%|\%|\s)/",lb)>0 then
do;
Taux=0.01;
end;
Thank you !