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 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 25 Aug 2010 08:04:05 -0400
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: Removing Blanks before and after a symbol
Comments: To: "Tyler L." <lonczakt@GMAIL.COM>

Tyler,

Glad to see that you solved it on your own but, unless I'm mistaken, you only needed the first two lines. e.g.:

data want; set have; String=tranwrd(tranwrd(String,"# ","#")," #","#"); run;

HTH, Art -------- On Wed, 25 Aug 2010 07:55:58 -0400, Tyler Lonczak <lonczakt@GMAIL.COM> wrote:

>Got it: >String = Tranwrd(String,'# ','#'); >String = Tranwrd(String,' #','#'); >String = Tranwrd(String,' # ','#'); > > >On Wed, Aug 25, 2010 at 7:38 AM, Tyler Lonczak <lonczakt@gmail.com> wrote: >> Hi, >> >> I'm hopeful someone may be able to help me with this. >> >> What I've got: " # This is # A string# with symbols # in it" >> >> What I need: "#This is#A string#with symbols#in it" >> >> Basically I need to remove the blank spaces to the left and right of >> the # symbol. Sometimes there will be a space to the left(right) of >> the symbol and sometimes not. >> >> Please help. >> >> Thanks, >> Tyler >>


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