re module non-greedy matches broken

lothar lothar at ultimathule.nul
Mon Apr 4 15:36:12 EDT 2005


with respect to the documentation, the module is broken.

the module does not necessarily deliver a "minimal length" match for a
non-greedy pattern.


"Fredrik Lundh" <fredrik at pythonware.com> wrote in message
news:mailman.1279.1112602272.1799.python-list at python.org...
> "lothar" wrote:
>
> > this is a bug and it needs to be fixed.
>
> it's not a bug, and it's not going to be "fixed".  search, findall,
finditer, sub,
> etc. all scan the target string from left to right, and process the first
location
> (or all locations) where the pattern matches.
>
> </F>
>
>
>






More information about the Python-list mailing list