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

Skip to content

Commit 84f387d

Browse files
committed
Issue #21593: Clarify that re.search() returns the first match
1 parent e42e129 commit 84f387d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/re.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,8 @@ attributes:
811811

812812
.. method:: regex.search(string[, pos[, endpos]])
813813

814-
Scan through *string* looking for a location where this regular expression
815-
produces a match, and return a corresponding :ref:`match object
814+
Scan through *string* looking for the first location where this regular
815+
expression produces a match, and return a corresponding :ref:`match object
816816
<match-objects>`. Return ``None`` if no position in the string matches the
817817
pattern; note that this is different from finding a zero-length match at some
818818
point in the string.

0 commit comments

Comments
 (0)