[Python-bugs-list] [ python-Bugs-696771 ] re-syntax.html probably should not refer to \g<0>

SourceForge.net noreply@sourceforge.net
Mon, 03 Mar 2003 11:03:26 -0800


Bugs item #696771, was opened at 2003-03-03 10:03
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=696771&group_id=5470

Category: Documentation
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Chapman (glchapman)
Assigned to: Nobody/Anonymous (nobody)
Summary: re-syntax.html probably should not refer to \g<0>

Initial Comment:
In discussing backreferences (\ number), re-syntax.html 
includes this parenthetical comment:

(There is a group 0, which is the entire matched pattern, 
but it can't be referenced with \0; instead, use \g<0>.) 

The \g syntax is not supported in regex patterns (only in 
replacement text for substitutions).  Even if it was 
supported, I can't imagine patterns could ever really 
support \0 (you'd have infinite regress, right?).  Anyway, 
I suggest removing the parenthetical comment (\g is 
documented in node104.html in the discussion of 
re.sub).


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=696771&group_id=5470