Martin v. Löwis wrote:

>> match groups are numbered 1..N, not 0..(N-1), in both the API and in the 
>> RE syntax (and we don't have much control over the latter).
> 
> py> m = re.match("a(b)","ab")
> py> m.group(0)
> 'ab'
> py> m.group(1)
> 'b'

0 isn't a group, it's an alias for the full match.

</F>

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to