From: Berker Peksag Date: Wed, 8 Jun 2016 11:56:56 +0000 (+0300) Subject: Issue #21593: Clarify that re.search() returns the first match X-Git-Tag: v3.5.2rc1~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84f387d420fd908973cf9660f91b448d7e848b42;p=thirdparty%2FPython%2Fcpython.git Issue #21593: Clarify that re.search() returns the first match --- diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 82beba1534e4..ceb795976d53 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -811,8 +811,8 @@ attributes: .. method:: regex.search(string[, pos[, endpos]]) - Scan through *string* looking for a location where this regular expression - produces a match, and return a corresponding :ref:`match object + Scan through *string* looking for the first location where this regular + expression produces a match, and return a corresponding :ref:`match object `. Return ``None`` if no position in the string matches the pattern; note that this is different from finding a zero-length match at some point in the string.