LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 25 Apr 2005 23:38:13 -0400
Reply-To:   harry.droogendyk@RBC.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Harry Droogendyk <harry.droogendyk@RBC.COM>
Subject:   Re: Clear redundant in string
Content-Type:   text/plain; charset="iso-8859-1"

Looks like you want to get rid of any non-alphanumeric characters. I'm sure one of the regexp gurus will offer up something mysterious and incredibly concise, but compress() will also do what you ask. Note the doubled-up double quotes.

data _null_; a = "int'-""l"; b = compress(a,"`~!@#$%^&*()-_=+[]\{}|;':"",./<>?"); put a= b=; run;

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Thomas Sent: Monday, April 25, 2005 11:01 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Clear redundant in string

Hi all,

May I know how to clear the redundant symbols contained in string as shown belows?

Thank you! Thomas

CONAME YAHOO! INC. ALCOA, INCORPORATION INT'L BUSSINESS MACHINE K&K ENTERPRISES

CONAME YAHOO INC ALCOA INCORPORATION INTL BUSSINESS MACHINE KK ENTERPRISES __________________________________________________________________________________________________________________________________

This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.


Back to: Top of message | Previous page | Main SAS-L page