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 (November 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 1 Nov 2000 12:33:02 -0800
Reply-To:   kmself@IX.NETCOM.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   kmself@IX.NETCOM.COM
Subject:   Re: remove extra space in character string
In-Reply-To:   <2868C7D82610D311A3930008C7CF288B0465133A@red-exch.amgen.com>; from mxu@AMGEN.COM on Wed, Nov 01, 2000 at 10:54:19AM -0800
Content-Type:   multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature";

on Wed, Nov 01, 2000 at 10:54:19AM -0800, Xu, Meifen (mxu@AMGEN.COM) wrote: > Hello, there: > > I have a character variable with most character string looking very regular. > But there are a few strings among the words having more than one space. I > certainly want to eliminate these extra space and tried translate(var, ' ', > ' '). It turned to me it does not work out. I don't think compress can > function at this case because between words one space needed for sure. > > Here is the string that I want to deal with: > > My leg was injured. this is original one. > > I like it looking like: > > My leg was injured.

s/ *// /g

...Damn! Wrong list!! <g>

...the mad evangelist strikes again...

-- Karsten M. Self <kmself@ix.netcom.com> http://www.netcom.com/~kmself Evangelist, Opensales, Inc. http://www.opensales.org What part of "Gestalt" don't you understand? There is no K5 cabal http://gestalt-system.sourceforge.net/ http://www.kuro5hin.org


[application/pgp-signature]


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