LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 13 Oct 1999 03:47:30 GMT
Reply-To:     Bill Kossack <kossack@NETCOM10.NETCOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bill Kossack <kossack@NETCOM10.NETCOM.COM>
Organization: Netcom
Subject:      Re: Filtering out a phone number

That might work except I would need to feed only the field with the junk in it. I am not sure about the other fields in the file at this time

David Cassell <cassell@mail.cor.epa.gov> wrote: : Then you'll need to use some sort of parser or regular expression : which can tell the difference between XXX XXX XXXX and your : *desired* data. A program [like sed] or a programming language : [like Perl] built around regexes would be one solution, as in : throwing your file through this one-liner:

: perl -lape 's/\d{3}\s\d{3}\s\d{4}//' infile > outfile

: Otherwise you may need to look into the regular expression : features in SAS. Look up the RXPARSE function and the : CALL RXCHANGE routine and see if the docs help any.

: David : -- : David Cassell, OAO cassell@mail.cor.epa.gov : Senior computing specialist : mathematical statistician

-- William S. Kossack Westminster, Colorado kossack@netcom.com


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