* lothar wrote: > re: > 4.2.1 Regular Expression Syntax > http://docs.python.org/lib/re-syntax.html > > *?, +?, ?? > Adding "?" after the qualifier makes it perform the match in non-greedy > or > minimal fashion; as few characters as possible will be matched. > > the regular expression module fails to perform non-greedy matches as > described in the documentation: more than "as few characters as possible" > are matched. > > this is a bug and it needs to be fixed.
The documentation is just incomplete. Non-greedy regexps still start matching the leftmost. So instead the longest of the leftmost you get the shortest of the leftmost. One may consider this as a documentation bug, yes. nd -- # Andrà Malo, <http://www.perlig.de/> # -- http://mail.python.org/mailman/listinfo/python-list