Hi @mosabbirfardin ,
Your requirements need 3 steps.
In the first step anyone character in '()-,.' is replaced by a SPACE.
The second step will look for 2-character word to replace it by a SPACE.
The third step looks for a word ending in a NUMBER to replace it by a SPACE.
data _null_;
txt = 'ATN1 (atrophin 1) (eg, dentatorubral-pallidoluysian atrophy) gene analysis,
evaluation to detect abnormal (eg, expanded) alleles';
txt = translate(txt,' ','()-,.');
wc = countw(txt);
do i = 1 to wc;
word = scan(txt, i);
if length(word) = 2 then txt = transtrn(txt, strip(word), strip(' '));
else if anydigit(word) then txt = transtrn(txt, strip(word), strip(' '));
end;
txt = upcase(compbl(txt));
put txt =;
run;
... View more