Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65b7863

Browse files
committed
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.
1 parent a8a1b9b commit 65b7863

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Doc/lib/libre.tex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,11 @@ \subsection{Regular Expression Objects}
476476
match.
477477

478478
The optional second parameter \var{pos} gives an index in the string
479-
where the search is to start; it defaults to \code{0}. The
480-
\character{\^} pattern character will not match at the index where the
481-
search is to start.
479+
where the search is to start; it defaults to \code{0}. This is not
480+
completely equivalent to slicing the string; the \code{'\^'} pattern
481+
character matches at the real beginning of the string and at positions
482+
just after a newline, but not necessarily at the index where the search
483+
is to start.
482484

483485
The optional parameter \var{endpos} limits how far the string will
484486
be searched; it will be as if the string is \var{endpos} characters

Doc/lib/libregex.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ \subsection{Module Contents}
288288
The optional second parameter, \var{pos}, gives an index in the string
289289
where the search is to start; it defaults to \code{0}. This is not
290290
completely equivalent to slicing the string; the \code{'\^'} pattern
291-
character matches at the real begin of the string and at positions
291+
character matches at the real beginning of the string and at positions
292292
just after a newline, not necessarily at the index where the search
293293
is to start.
294294
\end{funcdesc}

0 commit comments

Comments
 (0)