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 (September 2000, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 28 Sep 2000 11:39:25 -0400
Reply-To:     Daixin Yin <dxy02@HEALTH.STATE.NY.US>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Daixin Yin <dxy02@HEALTH.STATE.NY.US>
Subject:      Remove components from character strings(corrected)

Sorry. The data setp in previous message didn't read the variable correctly.

I'm trying to clean a 'dirty' character variable CITY, which has some unwanted components, like 0123456789#*.'/, etc.

Here is how the data looks like, ***********************; data city; input @1 city $25.; cards; 3 BUFFALO TORINO 10137 NEW YORK 1135 BROOLLYN NY #112 DARIE CT 06820 BINGHAMTON ENDWELL ; run; ************************;

The unwanted components appear at different positions, and I haven't figured out how to deal with it efficiently. Will do-loop do the trick? Macros? Any suggestion is appreciated.

THANKS.


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