I think you would have to break up the string into "words", and when one of the "words" is a valid date, you save it as a date (not a text string).
For example:
data want;
string='By_20Aug1990_it_has_become_more_powerfull.';
do i=1 to countw(string,'_');
thisstring=scan(string,i,'_');
date = input(thisstring,date9.);
if not missing(date) then output;
format date date9.;
drop i thisstring;
end;
run;
... View more