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 (March 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 17 Mar 2005 11:13:33 -0800
Reply-To:     lzhang9830@YAHOO.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Lei Zhang <lzhang9830@YAHOO.COM>
Organization: http://groups.google.com
Subject:      Re: What is the regular expression for SAS format name?
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

Hi Richard and Gary, Thanks a lot for your kind message. It helps me a lot! What I want to do is to parse a SAS format statement separated by a SAS format. For example,

For example: "a b c 2.8 e f g $fmt. u v w $abc12.1 a b c A1224.123 $char8.2" will be parsed into a b c due to 2.8 e f g due to $fmt. u v w due to $abc12.1 a b c A1234.123 due to $char8.2

I came up with a RE as follow '/\$?[_a-zA-Z]\w{0,31}\.\d{0,2}/' as the separator of a Format-like string, but it does not always work at all kinds of situations.

Your advice will be very much appreciated. Thanks

LZ


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