[Python-bugs-list] [ python-Bugs-576079 ] Inconsistent behaviour in re grouping
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 01 Jul 2002 11:22:41 -0700
Bugs item #576079, was opened at 2002-07-01 20:22
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=576079&group_id=5470
Category: Regular Expressions
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Pedro Rodriguez (pedro_rodriguez)
Assigned to: Fredrik Lundh (effbot)
Summary: Inconsistent behaviour in re grouping
Initial Comment:
The following expression (?P<name>.*) and
(?P<name>(.*)) don't behave in the same way.
When the matching fails, the first group will be None,
but the last one will contain an empty string.
The problem occurs with python 2.1.1 and 2.2. (and
latest CVS for 2.3)
Python 1.5.2 OTH works fine.
(example file attached)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=576079&group_id=5470