regexp non-greedy matching bug?

Mike Meyer mwm at mired.org
Sun Dec 4 07:04:54 EST 2005


"Fredrik Lundh" <fredrik at pythonware.com> writes:
> Mike Meyer wrote:
>> ^ must match the beginning of the string (BTW, you can get the same
>> behavior by leaving off the ^ and using search instead of match).
> that's backwards, isn't it?  using ^ with match is usually pointless (since
> match only looks at the first position anyway), and using ^ with search
> is also usually pointless...

Yup, you're right. The '^' was redundant in the OP's post.

     <mike 
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list