[Python-checkins] python/dist/src/Doc/lib libre.tex,1.96,1.97
niemeyer@users.sourceforge.net
niemeyer@users.sourceforge.net
2003年4月19日 18:49:02 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv2974/lib
Modified Files:
libre.tex
Log Message:
- Included examples documenting how the lastindex member of
match objects work.
Index: libre.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** libre.tex 4 Mar 2003 14:17:05 -0000 1.96
--- libre.tex 20 Apr 2003 01:48:59 -0000 1.97
***************
*** 824,835 ****
\end{memberdesc}
\begin{memberdesc}[MatchObject]{lastgroup}
The name of the last matched capturing group, or \code{None} if the
group didn't have a name, or if no group was matched at all.
- \end{memberdesc}
-
- \begin{memberdesc}[MatchObject]{lastindex}
- The integer index of the last matched capturing group, or \code{None}
- if no group was matched at all.
\end{memberdesc}
--- 824,839 ----
\end{memberdesc}
+ \begin{memberdesc}[MatchObject]{lastindex}
+ The integer index of the last matched capturing group, or \code{None}
+ if no group was matched at all. For example, the expressions
+ \regexp{(a)b}, \regexp{((a)(b))}, and \regexp{((ab))} will have
+ \code{lastindex == 1} if applyied to the string \code{'ab'},
+ while the expression \regexp{(a)(b)} will have \code{lastindex == 2},
+ if applyied to the same string.
+ \end{memberdesc}
+
\begin{memberdesc}[MatchObject]{lastgroup}
The name of the last matched capturing group, or \code{None} if the
group didn't have a name, or if no group was matched at all.
\end{memberdesc}