data test;
input name $25.;
cards;
x., test
.x test
test x.
;
run;
data want;
set test;
a=prxchange('s/\b(x\.,|x\.|\x)\b//i', -1, name);
run; Hello there! I'm trying to extract from string literal all parts which looks like x or x. or x., So I've wrtitten the code above A result dataset you can see in the table below It seems that SAS had deleted only x character, not x. or x., despite fact of existence x\. and x\., in regular expression before x Does anyone know how it could be fixed? Resulted dataset: name a 1 x., test ., test 2 .x test . test 3 test x. test . Desired dataset: name a 1 x., test test 2 .x test . test 3 test x. test
... View more