Date: Thu, 15 Jul 2004 22:57:30 -0400
Reply-To: "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Subject: Re: rxparse rxchange problem
On Thu, 15 Jul 2004 18:39:53 -0600, Alan Churchill
<EmailMeDirectly@THISWEBSITE-ERRATIX.US> wrote:
>Slightly off topic but a big help when I deal with regular expressions.
Try
>out this utility and see what you think:
>
>http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=01e0dfb7-
0182-45cd-94f7-2ed2df2504a9
>
>It is not SAS specific but is a good way to quickly test expressions. I've
>done a lot of rxparse in SAS but I have not tested between the above and
>SAS. However, it should work...The source lib is available if someone
wants
>to tie it into the SAS system.
>
>Also, here is a good source for common regular expressions:
>
>http://www.regexlib.com/
Hi,
Just to add my own $0.02... If you get deeper into the regular expression
stuff, then you realize that there are many subtle aspects of the RegEx
and also realize that there are many different "dialects" of them, with
considerable differences.
If you start using RegEx, IMHO, it would be wise avoiding sas's rx unless
you have no alternatives. Sas's rx syntax is *very* different from other
RegEx's -- since it is intentionally designed to be sas-like. Instead, I
would rather start learning perl's or sas's prx, which are about the same
thing.
The authoritative reference to the RegEx core concepts, as well as the
details of the most common dialects of RegEx (except .NET's :-/), seems to
be the Jeffrey Friedl's "Mastering Regular Expressions," which, by the
way, is one of the rare, beautifully typeset, books.
Even though sas's prx is based on perl's RegEx source, not all the
features are supported. See the prx reference page at:
http://support.sas.com/rnd/base/topics/datastep/perl_regexp/regexp2.html
HTH.
Cheers,
Chang
|