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 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 22 Nov 2006 22:56:29 -0800
Reply-To:   David L Cassell <davidlcassell@MSN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   David L Cassell <davidlcassell@MSN.COM>
Subject:   Re: OT: Chance to Make SAS-L History: Did You Know That...
In-Reply-To:   <403593359CA56C4CAE1F8F4F00DCFE7D07294EC4@MAILBE2.westat.com>
Content-Type:   text/plain; format=flowed

RHOADSM1@WESTAT.COM sagely spoke: >Did you know that: > >You need to be a little careful when using the \w ("word") character >class in regular expressions. > >I just ran across an example in the SAS documentation using PRXPOSN to >reverse first and last names. The regular expression uses \w to >represent each name like so: /(\w+), (\w+)/ > >However, "word" characters are defined as alphanumeric plus the >underscore. Notably, they do not include hyphens or apostrophes. > >Thus, while the example works fine on the test data they supplied, it >does not work correctly with names such as O'Reilly or Sekula-Gibbs. > >Mike Rhoads >Westat >RhoadsM1@Westat.com

This is one of the things I stress in my PRX function seminars. The 'word' character is a logical 'word' for, say, a SAS or Perl programmer, not for a speaker of English.

HTCT, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ View Athlete’s Collections with Live Search http://sportmaps.live.com/index.html?source=hmemailtaglinenov06&FORM=MGAC01


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