From: Andrew M. Kuchling Date: Mon, 22 Jun 1998 15:02:42 +0000 (+0000) Subject: Fix unclear wording pointed out by Tim Peters, about the interaction between X-Git-Tag: v1.5.2a1~437 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=65b7863efc55a284bb16d4c4a25f774dcbe21776;p=thirdparty%2FPython%2Fcpython.git Fix unclear wording pointed out by Tim Peters, about the interaction between ^ and the pos argument to re.match(). Also, fixed a typo in libregex.tex. --- diff --git a/Doc/lib/libre.tex b/Doc/lib/libre.tex index a47723f81b0c..a1bcf06c9f85 100644 --- a/Doc/lib/libre.tex +++ b/Doc/lib/libre.tex @@ -476,9 +476,11 @@ attributes: match. The optional second parameter \var{pos} gives an index in the string - where the search is to start; it defaults to \code{0}. The - \character{\^} pattern character will not match at the index where the - search is to start. + where the search is to start; it defaults to \code{0}. This is not + completely equivalent to slicing the string; the \code{'\^'} pattern + character matches at the real beginning of the string and at positions + just after a newline, but not necessarily at the index where the search + is to start. The optional parameter \var{endpos} limits how far the string will be searched; it will be as if the string is \var{endpos} characters diff --git a/Doc/lib/libregex.tex b/Doc/lib/libregex.tex index fabc182c8820..e3adf55701a5 100644 --- a/Doc/lib/libregex.tex +++ b/Doc/lib/libregex.tex @@ -288,7 +288,7 @@ Compiled regular expression objects support these methods: The optional second parameter, \var{pos}, gives an index in the string where the search is to start; it defaults to \code{0}. This is not completely equivalent to slicing the string; the \code{'\^'} pattern - character matches at the real begin of the string and at positions + character matches at the real beginning of the string and at positions just after a newline, not necessarily at the index where the search is to start. \end{funcdesc}