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 (February 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 8 Feb 2011 12:58:36 -0500
Reply-To:   Nat Wooding <nathani@VERIZON.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Nat Wooding <nathani@VERIZON.NET>
Subject:   Re: Strip Function And Leading and Trailing Tab Chars
In-Reply-To:   <BLU152-w42C1DBA97395C11CBA8228DEEA0@phx.gbl>
Content-Type:   text/plain; charset="us-ascii"

Getting back to the basic issue of what are the blanks in a data set, I still like the feature of being able to switch the display to Hex On and also to be able to search for non-printing characters so that I could identify them and choose how to deal with them. These features were available in ISPF on the mainframe and as I recall are available in a couple of the PC editors that I have not tried.

Nat Wooding

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of toby dunn Sent: Tuesday, February 08, 2011 12:26 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Strip Function And Leading and Trailing Tab Chars

Tom,

It takes less time and effort for the RegEx engine to run the two calls seperately than it would if it were all in one big honker RegEx call. In short having to match everything in the middle of the string eats up way too much time and negates the optimizers ability to optimize. By breaking it down the optimizer can see that it only needs to match the whitespace from the start of the string to the first non-whitespace character. It then stops the match and moves on to the replacement part of the search and replace operation.

Toby Dunn

"I'm a hell bent 100% Texan til I die"

"Don't touch my Willie, I don't know you that well"

> Date: Tue, 8 Feb 2011 11:46:56 -0500 > From: tom.abernathy@GMAIL.COM > Subject: Re: Strip Function And Leading and Trailing Tab Chars > To: SAS-L@LISTSERV.UGA.EDU > > On Tue, 8 Feb 2011 16:39:14 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote: > >PrxChange( 's/\s*$//o' , 1 , Text ) > >PrxChange( 's/^\s*//o' , 1 , Text ) > > > Toby - > Why does it need two statements? Is there no way to select out the middle > (non-white space) part in one regx? Is it because the matches are too greedy? > > - Tom


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