"lothar" wrote:

> with respect to the documentation, the module is broken.

nope.

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

it isn't supposed to: a regular expression describes a *set* of matching
strings, and the engine is free to return any string from that set.  Python's
engine returns the *first* string it finds that belongs to the set.  if you use
a non-greedy operator, the engine will return the first non-greedy match
it finds, not the overall shortest non-greedy match.

if you don't want to understand how regular expressions work, don't use
them.

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to