LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 17 Sep 2006 23:29:33 -0700
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: Perl regex options (was Prxchange: possible to make
              replace...)
In-Reply-To:  <200609151655.k8FErhXL025894@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

pardee.r@GHC.ORG wrote back: > >Chopped liver? Never! Apologies! ;-) > >That makes perfect sense--thanks! > >So I'm guessing the complete list of chars that can precede the opening >'/' on a regex is 's' (for 'substitution'?) in which case you need the >2-part /match/replace/ type, and 'm' (for 'matching'?) in which case you >can only have the /match/ portion. But the 'm' is the default & can be >left off. > >Does that sound about right? > >Thanks! > >-Roy

You really shouldn't think of it as 'characters you can stick on the front'.

You really need to think of it as an entirely separate critter. /pattern/ and s/pattern/subst/ are as different as INDEX() and SUBSTR(). The first is a matching function, and the second is a substitution function.

And the letters you can put on the end are really far more useful in Perl than in PRX functions. I only use the 'i' suffix myself except in really rare cases.

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

_________________________________________________________________ Search from any web page with powerful protection. Get the FREE Windows Live Toolbar Today! http://get.live.com/toolbar/overview


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