Making regex suck less
John Roth
johnroth at ameritech.net
Sun Sep 1 19:40:36 EDT 2002
"A.M. Kuchling" <amk at amk.ca> wrote in message
news:un50ccotaak86b at corp.supernews.com...
> In article <3d725881.345921 at news.t-online.de>, Gerson Kurz wrote:
> > in the match or find function. So basically, couldn't one come up
with
> > a *human readable* syntax for re, and compile that instead? Python
>
> Maybe Ka-Ping Yee's rxb? http://web.lfw.org/python/rxb15.py
>
> The problem with a new syntax is that no one else would be using it,
so
> you'd still need to learn the existing syntax for use with grep, vi,
Perl,
> &c. (It wouldn't surprise me if Perl 6's revised regexes run into
this very
> difficulty and don't gain much adoption.)
I see you've already gotten to my suggestion - look at Apocalypse 5
and Exegesis 5 on the O'Reilly Perl page and see what Larry Wall
has done.
I tend to agree that Larry is going out on a limb. However, since he's
done so, if we are thinking about a new regex syntax, we really
should consider doing it the same way. As you point out, there's going
to be enough difficulty getting one radical revision accepted. Getting
two different ones accepted is likely to sink everyone's effort.
Also, doing it the same way will simplify the Python effort in Parrot
(assuming anyone cares about that any more...)
And as far as grep, Vi and so forth are concerned (Perl isn't
an issue - that's the way it's going,) doing something to fix them
isn't all that hard - at least for the GNU versions of the programs.
>
> --amk
More information about the Python-list
mailing list