Date: Fri, 1 Aug 2003 13:54:10 -0400
Reply-To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject: Re: Compress multiple spaces _outside_ quoted values ?
Content-Type: text/plain; charset="Windows-1252"
From: "Ian Whitlock" <WHITLOI1@WESTAT.com>
To: "'Droogendyk, Harry'" <Harry.Droogendyk@CIBC.COM>;
Sent: Friday, August 01, 2003 1:25 PM
Subject: RE: Compress multiple spaces _outside_ quoted values ?
> I am not sure how elegance is defined here. I see it as a very nice
> solution. However, some tightening up is needed for the counting of
> is needed. With the line
> Matched "double quotes in this string", "what to do with "
> your code produced the line
> n=Matched "double quotes in this string", "what to do with "
> " " " " " "
> _num_quotes = length(string||"*")
> - length(compress(string||"*",'"'));
> Can a string have, "" meaning a double quote internal to a quoted part?
The string is a dynamically constructed where clause that is applied to a
Sas Data Set Model via _setWhere() and displayed elsewhere.
I prefer not to have extraneous spaces showing.
Q = double quote
q = single quote
So, yes, the string can have QQ meaning Q internal to a Q'ed string, or
qq meaning q internal to a q'ed string
My string might have the value
LName = 'O''Connor' and FName = 'James'
Comment = "Agreed ""in principal""" or Comment = "Agreed ""in
Would be nice if SAS ever surfaced parts of the tokenizer to a datastep/scl