A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-December/070153.html below:

[Python-Dev] a feature i'd like to see in python #2: indexing of match objects

[Python-Dev] a feature i'd like to see in python #2: indexing of match objects [Python-Dev] a feature i'd like to see in python #2: indexing of match objectsFredrik Lundh fredrik at pythonware.com
Sun Dec 3 20:14:17 CET 2006
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>

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4