Date: Thu, 7 Jul 2005 17:06:42 -0700
Reply-To: DavidL Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: DavidL Cassell <davidlcassell@MSN.COM>
Subject: Re: fuzzy string search
Content-Type: text/plain; format=flowed
>I think you may want to look into using regular expressions. There are SAS
>RX functions available in SAS V8.1: RXPARSE, RXMATCH, etc...
>Apparently there are now also new Perl regular expression functions
>available in SAS V9. Look up functions PRXPARSE,
>PRXMATCH, PRXCHANGE, and PRXPOSN.
>PRX Function Reference:
>These seem rather complicated unless you are already a PERL user, and I've
>never used them, but they seem powerful enough to use for even the most
>complicated fuzzy string searches.
No, they're really a piece of cake! Trust me!
Just because people keep saying Perl is a write-once/read-never language...
Seriously, the PRX... functions are easier to learn than the RX...
because there is a lot more in the way of resources for the Perl regular
expressions. You can go on the internet and I'll guess that you could
search for and find a dozen free Perl regex tutorials in seconds.
Plus, the Perl regexen are relatively intuitive (at least for me), with
/Jen/ matches any string with 'Jen' in it
/(Jen|Jennifer)/ matches any string with 'Jen' or 'Jennifer'
If you're used to using () to group stuff in SAS, and | as a logical OR,
then you're already halfway there.
HTCT (Happy To Cause Trouble),
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Donít just search. Find. Check out the new MSN Search!