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 (August 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 6 Aug 2003 13:26:11 +0100
Reply-To:     Jeff Tomlinson <jeff.tomlinson@NTLWORLD.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jeff Tomlinson <jeff.tomlinson@NTLWORLD.COM>
Subject:      Re: Help with RXPARSE
Comments: To: Yan Lee <cmg3452003@YAHOO.CO.UK>
In-Reply-To:  <5ac2d0c2.0308060327.35660a26@posting.google.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

Try something like the following :-

if _n_=1 then do; retain rx; rx = rxparse( "($C+) to ''''&PREFIX.==''''" ); end; call rxchange( rx, 999, string);

Kind regards == Jeff

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Yan Lee Sent: 06 August 2003 12:27 To: SAS-L@LISTSERV.UGA.EDU Subject: Help with RXPARSE

I have a string of words separated by space(s) and would like each word to be quoted by a single quote character ( ' ). Also in addition to this I would like each word to prefix by a text constant . I would like to do this with RXPARSE with a macro function.

/* example */ %macro qword(string=, prefix=); ... %mend;

%put %qword(string = jan feb march, prefix=2003);

/* the result of this should be */ '2003jan' '2003feb' '2003march'

Many Thanks


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