[Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.66,1.67
Eric S. Raymond
esr@users.sourceforge.net
Tue, 28 Aug 2001 05:50:05 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv3406
Modified Files:
libre.tex
Log Message:
Plant a mention in the description of backreferences of the fact that
while \0 doesn't do what one might expect, \g<0> does.
Index: libre.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** libre.tex 2001/08/02 20:52:00 1.66
--- libre.tex 2001/08/28 12:50:03 1.67
***************
*** 298,301 ****
--- 298,303 ----
is 0, or \var{number} is 3 octal digits long, it will not be interpreted
as a group match, but as the character with octal value \var{number}.
+ (There is a group 0, which is the entire matched pattern, but it can't
+ be referenced with \regexp{\e 0}; instead, use \regexp{\e g<0>}.)
Inside the \character{[} and \character{]} of a character class, all numeric
escapes are treated as characters.
***************
*** 567,571 ****
ambiguous in a replacement such as \samp{\e g<2>0}. \samp{\e 20}
would be interpreted as a reference to group 20, not a reference to
! group 2 followed by the literal character \character{0}.
\end{funcdesc}
--- 569,575 ----
ambiguous in a replacement such as \samp{\e g<2>0}. \samp{\e 20}
would be interpreted as a reference to group 20, not a reference to
! group 2 followed by the literal character \character{0}. The
! backreference \samp{\e g<0>} substitutes in the entire substring
! matched by the RE.
\end{funcdesc}