| Date: | Fri, 14 Jul 2000 09:28:50 -0700 |
| Reply-To: | Cassell.David@EPAMAIL.EPA.GOV |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "David L. Cassell" <Cassell.David@EPAMAIL.EPA.GOV> |
| Subject: | Re: Help with using the RX character string functions |
| Content-type: | text/plain; charset=us-ascii |
|---|
Scott, you wrote:
> I heard Randall Schwartz quip that entire Perl programs could be built
> between the s///ge construct. Arbitrarily complicated code blocks
> permitted in regex replacement!
That's "Randal" with one "l", please. And his statement is true..
unfortunately. :-) The latest Perl regexen can do everything except
clean the windows and sing Aida. But I'm sure Ilya is working hard on
adding those features to the next version. :-)
More importantly, Perl regexes can be written using the /x modifier
so that they are actually *readable*, with commments insetable at multiple
points along the way to explain the maniacal construct you built.. or
have inherited.
Unfortunately, the power of those regexes also leads to frequent misuse.
Lots of people leap to regexes to solve their problems when they really
have a task for simple string manipulation, or they really need something
like a parser or lexer.
> Regex sophistication is an area where SAS is clearly
> lagging/misdirected. This was actually what drove me to learn Perl
> when SAS faltered.
Actually, nothing in SAS "drove" me to learn Perl. I just like languages.
And many of the problems I saw with SAS which made certain tasks much easier in
Perl have now been addressed in version 8 . So now I have lots of options.
That's why I've decided to code up my next program in Befunge. :-) :-)
David
--
David Cassell, OAO Corp. Cassell.David@epa.gov
Senior computing specialist
mathematical statistician
|