Date: Wed, 7 Oct 2009 01:48:59 -0500
Reply-To: Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Subject: Re: extract portion from string
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
p=index(MyData,"@");
if p>1 then want=substr(MyData,1,p-1);
else want="";
----- Original Message -----
From: "SUBSCRIBE SAS-L Joe H. Smith" <peesari.mahesh@GMAIL.COM>
To: <SAS-L@LISTSERV.UGA.EDU>
Sent: Wednesday, October 07, 2009 01:43
Subject: extract portion from string
> hi all,
>
> i have to extract some part from portion of string,
>
> My data:
> I@napier.ac.uk
> P.Bhardwaj@napier.ac.uk
> Scott@rbs.co.uk
> Alan@rbs.co.uk
> abc@s.com
>
> want:
> I
> P.Bhardwaj
> Scott
> Alan
> abc
>
> Thanks
>
|