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 (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:         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 ?
Comments: To: Ian Whitlock <WHITLOI1@WESTAT.com>,
          "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Content-Type: text/plain; charset="Windows-1252"

From: "Ian Whitlock" <WHITLOI1@WESTAT.com> To: "'Droogendyk, Harry'" <Harry.Droogendyk@CIBC.COM>; <SAS-L@LISTSERV.UGA.EDU> Cc: <radevenz@IX.NETCOM.COM> Sent: Friday, August 01, 2003 1:25 PM Subject: RE: Compress multiple spaces _outside_ quoted values ?

> Harry, > > 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 quotes > 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 " " > " " " " " " > > Fix: > > _num_quotes = length(string||"*") > - length(compress(string||"*",'"')); > > Richard, > > Can a string have, "" meaning a double quote internal to a quoted part? > > IanWhitlock@westat.com

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

Would be nice if SAS ever surfaced parts of the tokenizer to a datastep/scl function.


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