i liked all the answers which are simpler and much cleaner, just one more way
data want;
set have;
IF _N_ =1 THEN PATTERN = PRXPARSE ("/((?<=ORIG:)\S+)/");
retain pattern;
if prxmatch(pattern, orig) then
call prxposn(pattern, 1, position, length);
val = substr(orig, position,length);
drop pattern position;
run;
... View more