[Python-Dev] Re: Some questions about maintenance of the regular
expression code.
Tim Peters
tim.one@comcast.net
Wed, 26 Feb 2003 14:25:14 -0500
An irony is that *? is almost always used like so:
.*? some_literal_string
where the user *intends* "search right for the first appearance of
some_literal_string, and chew up the characters until then". If that's what
.*? actually meant (it doesn't), it could be implemented very efficiently
without recursion. Instead, regexp engines work supernaturally hard to
implement something few users understand, and very few actually want. I
love regexps <wink>.