I looked up prx, but cannot get it to work. This sample I modified seems to be what I need, but it is not working:
data _null_;
if _N_ = 1 then
do;
retain patternID;
/* The i option specifies a case insensitive search. */
pattern = "/Mount|TGH|Joe|Michael|Sunny|Toro|Bay|Brid|Provi/i";
patternID = prxparse(pattern);
end;
input service_provider $90.;
call prxsubstr(patternID, service_provider, position);
if position ^= 0 then
do;
match = substr(service_provider, position);
put match:$QUOTE. "found in " service_provider:$QUOTE.;
end;
... View more