Date: Mon, 27 Sep 2010 21:38:14 +0530
Reply-To: "Ravinder.Maramamula" <ravinsun@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Ravinder.Maramamula" <ravinsun@GMAIL.COM>
Subject: Re: Character and Alphanumeric values
In-Reply-To: <201009271548.o8REC2nJ018006@willow.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Gerhard,
Sorry for the confusion ,I want to remove all the patterns which are
associated with numbers.
so i want to remove all the below patterns and want to put in another
dataset.
a1,a21,ab1,abc231,a1bcdef .
How can i achieve that ,any help in this aspect is well appreciated.
Thanks,
Ravinder
On Mon, Sep 27, 2010 at 9:18 PM, Gerhard Hellriegel <
gerhard.hellriegel@t-online.de> wrote:
> for me it is not fully clear what you want. You write, you want to remove
> all the alphanumeric data and place it in another dataset. Alphanumeric is
> ALL, numbers and characters! What do you want to remove? Your example
> seems to extract only records without any numeric part. The "want"
> dataset, is that the "other" - dataset, or that what remains after
> removing something. What is with data with any number-parts? Records
> deleted?
>
> I'm not aware of any informat for telephone numbers. Think there are no
> real standards for the numbers.
> With the compress-function you can remove anything what you don't want,
> including blanks, -, (, ), ....
>
> data a;
> x="(123) - 123456";
> y=compress(x,"(),.+-[] ");
> put x= / y=;
> run;
>
> Gerhard
>
>
>
>
>
> On Mon, 27 Sep 2010 06:06:09 -0400, Ravinder.Maramamula
> <ravinsun@GMAIL.COM> wrote:
>
> >Hi list,
> >
> >
> >I have a dataset and it contains a character variable which
> >has mixture of values like character and alphanumeric.
> >I want to validate the dataset and remove all the alphanumeric
> >values and place it in another dataset.
> >
> >data have ;
> >infile datalines;
> >input var;
> >datalines;
> >aa
> >ab
> >abc
> >abcde
> >....
> >...
> >abcdefghijklmnopqrstuvwxyz
> >a23
> >b1
> >ab2
> >;
> >dataset want:
> >aa
> >ab
> >abc
> >abcde
> >.....
> >.....
> >abcdefghijklmnopqrstuvwxyz
> >;
> >Do we have any informat which would directly read telephone numbers of
> type
> >(987)6543210 as 9876543210.
> >
> >Thanks in advance for your time.
> >
> >Regards,
> >Ravi
>
--
TOUGHT TIMES NEVER LAST!!!!!BUT TOUGH PEOPLE DO!!!!!
|