Χρήστος Γεωργίου (Christos Georgiou) <t...@users.sourceforge.net> added the 
comment:

As I see it, it's more like:

>>> re.search('a.*c|a.*|.*c', 'abc').group()

producing 'bc' instead of 'abc'. Substitute "(?<=^A)" for "a" and "(?=Z$)" for 
"c" in the pattern above.

In your example, the first part ('bc') does not match the whole string ('abc'). 
In my example, the first part ('(?<=^A).*(?=Z$)') matches the whole string 
('A***Z').

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10139>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to