File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -823,16 +823,20 @@ \subsection{Match Objects \label{match-objects}}
823823into the string beyond which the RE engine will not go.
824824\end {memberdesc }
825825
826+ \begin {memberdesc }[MatchObject]{lastindex}
827+ The integer index of the last matched capturing group, or \code {None}
828+ if no group was matched at all. For example, the expressions
829+ \regexp {(a)b}, \regexp {((a)(b))}, and \regexp {((ab))} will have
830+ \code {lastindex == 1} if applyied to the string \code {'ab'},
831+ while the expression \regexp {(a)(b)} will have \code {lastindex == 2},
832+ if applyied to the same string.
833+ \end {memberdesc }
834+
826835\begin {memberdesc }[MatchObject]{lastgroup}
827836The name of the last matched capturing group, or \code {None} if the
828837group didn't have a name, or if no group was matched at all.
829838\end {memberdesc }
830839
831- \begin {memberdesc }[MatchObject]{lastindex}
832- The integer index of the last matched capturing group, or \code {None}
833- if no group was matched at all.
834- \end {memberdesc }
835-
836840\begin {memberdesc }[MatchObject]{re}
837841The regular expression object whose \method {match()} or
838842\method {search()} method produced this \class {MatchObject} instance.
You can’t perform that action at this time.
0 commit comments