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 (November 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 23 Nov 2004 10:35:41 -0800
Reply-To:     "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:      Re: SAS Function
Comments: To: "Bosch, Jules" <>

Jules - Some random thoughts -

In v9 it seems like a perfect use for Perl regular expressions - here are some papers .

Index would work, but only returns the first, so you'd need to successively substring your text. Probably simpler would be (if your dates are always delimited within the strings) scanning the sub-elements through a date informat (untested): array date{15}; j=1; i=1 do (while scan(var,i) ne ''); if input(scan(var,i),date.) ne . then do; date(j)= input(scan(var,i),date.); j+1; i+1; end; end;


Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Bosch, Jules Sent: Tuesday, November 23, 2004 7:30 AM To: SAS-L@LISTSERV.UGA.EDU Subject: SAS Function


I have no documentation at the moment but need to read a string seeking date occurrences (format=ddmmmyy or ddmmmyyyy). Often there is more than one date in the string. I think the INDEXC function should work but don't know if it will locate each occurrence of an excerpt or just the first. Any suggestions would be greatly appreciated?


Jules Bosch

********************************************************************* This message and any attachments are solely for the intended recipient. If you are not the intended recipient, disclosure, copying, use or distribution of the information included in this message is prohibited -- Please immediately and permanently delete.

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