re documentation error

Carlos Gaston Alvarez cgaston at moonqzie.com
Mon Sep 17 13:06:03 EDT 2001


Ok, thanks.

Chau,

Gaston


"Fredrik Lundh" <fredrik at pythonware.com> wrote in message
news:2zpp7.5509$sn6.595199 at newsc.telia.net...
> Carlos Gaston Alvarez wrote:
> > >>> p = re.compile('x*')
> > >>> p.sub('-', 'abxd')
> > '-a-b-d-'
> >
> > It seems like an error. If it is not, someone explain it to me please
(and
> > update the doc).
>
> looks like a bug in the new (2.0) engine:
>
> >>> import pre # 1.5.2's regular expression engine
> >>> p = pre.compile("x*")
> >>> p.sub("-", "abxd")
> '-a-b-d-'
>
> >>> import sre # 2.0's regular expression engine
> >>> p = sre.compile("x*")
> >>> p.sub("-", "abxd")
> '-a-b--d-'
>
> I've added it to the sourceforge bug list (issue #462270)
>
> </F>
>
> <!-- (the eff-bot guide to) the python standard library:
> http://www.pythonware.com/people/fredrik/librarybook.htm
> -->
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>





More information about the Python-list mailing list