[Python-Dev] sre improvements
Thu, 14 Jun 2001 00:30:19 -0700
Greg Ward wrote:
> I think I'd have to agree with /F on this one... somewhere around Perl
> 5.003 or 5.004, regexes in Perl went from being a powerful and really
> cool facility to being a massively overgrown language-within-a-language.
> I *tried* to use some of the fancy new features a few times out of
> curiosity, but could never get them to work. (At the time, I think I
> was a pretty sharp Perl programmer, although I've dulled since then.)
I would rather see us try a new approach to regular expressions. I've
seen a few proposals for more verbose-but-readable syntaxes. I think one
was from Greg Ewing? And maybe one from Ping?
For those of us who use regular expressions only once in a while (i.e.
the lucky ones), the current syntax is a holy terror. Which characters
are magical again? In what contexts? With how many levels of
backslashing? Upper case W versus lower case W?
Obviously we can never abandon the tried and true Perl5 RE module, but I
think we could have another syntax on top.
Take a recipe. Leave a recipe.
Python Cookbook! http://www.ActiveState.com/pythoncookbook