diff options
author | Georg Brandl <georg@python.org> | 2008-07-19 13:48:44 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-07-19 13:48:44 (GMT) |
commit | b46d6ff279bed9d9452da4bbc6a26319120e5f8e (patch) | |
tree | 9cfeb21f65564eaceb9eb8d2c5de1bd7f7ed7350 /Doc | |
parent | 3de1e69dc7adc3eff84e0c1b8b22b4abdc58d268 (diff) | |
download | cpython-b46d6ff279bed9d9452da4bbc6a26319120e5f8e.zip cpython-b46d6ff279bed9d9452da4bbc6a26319120e5f8e.tar.gz cpython-b46d6ff279bed9d9452da4bbc6a26319120e5f8e.tar.bz2 |
Add ordering info for findall and finditer.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/re.rst | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 05db89d..c9466af 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -575,10 +575,11 @@ 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. .. versionadded:: 1.5.2 @@ -589,8 +590,10 @@ form. .. 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. .. versionadded:: 2.2 |