As a start you could use the compress function, like below, this will remove all characters, except alphabetic, digits and punctuation anywhere in your email. Maybe one should also check what makes up a valid email address, see here https://en.wikipedia.org/wiki/Email_address
Maybe there are Regular expressions that check for valid email addresses as well. You could use those with the PRX... functions.
Also have a look at this discussion
https://communities.sas.com/t5/SAS-Procedures/validate-email-address/m-p/37459#U37459
data have;
length email newEmail $ 256;
email = cats("090a0d"x, "sugus-sugus_sugus.1234@sugus.com.edu", "01"x);
newEmail = compress(email, "" , "adpk");
putlog _all_;
run;
Bruno
... View more