summaryrefslogtreecommitdiffstats
path: root/Doc/library/re.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r--Doc/library/re.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 5831364..a6ebc22 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -571,17 +571,20 @@ form.
.. function:: findall(pattern, string[, flags])
Return all non-overlapping matches of *pattern* in *string*, as a list of
- strings. If one or more groups are present in the pattern, return a list of
- groups; this will be a list of tuples if the pattern has more than one group.
- Empty matches are included in the result unless they touch the beginning of
- another match.
+ strings. The *string* is scanned left-to-right, and matches are returned in
+ the order found. If one or more groups are present in the pattern, return a
+ list of groups; this will be a list of tuples if the pattern has more than
+ one group. Empty matches are included in the result unless they touch the
+ beginning of another match.
.. function:: finditer(pattern, string[, flags])
Return an :term:`iterator` yielding :class:`MatchObject` instances over all
- non-overlapping matches for the RE *pattern* in *string*. Empty matches are
- included in the result unless they touch the beginning of another match.
+ non-overlapping matches for the RE *pattern* in *string*. The *string* is
+ scanned left-to-right, and matches are returned in the order found. Empty
+ matches are included in the result unless they touch the beginning of another
+ match.
.. function:: sub(pattern, repl, string[, count])