re documentation error

Fredrik Lundh fredrik at pythonware.com
Tue Sep 18 13:33:47 EDT 2001


Carlos Gaston Alvarez wrote:

> Heiko Wundram:
> > Look what it does (in my oppinion that is correct behaviour).

> I dont agree.
> * means {0,inifite}
> so 'x*' matchs '', 'x', 'xx', 'xxxx', ...
> it should be greedy. If not when you have
> 'xxx' you can say that it is
> '' + 'x' + '' + 'x' + '' + 'x' + ''

I have no idea what you're talking about.

Heiko correctly explained what the "sub" method in 2.0
and later does when the pattern doesn't match at all.

1.5.2's RE engine does things a bit differently.

This is a bug in the new engine, and has nothing to do
with how the "*" operator works.

</F>





More information about the Python-list mailing list