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
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