mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #21593: Clarify that re.search() returns the first match
This commit is contained in:
parent
e42e129ebe
commit
84f387d420
1 changed files with 2 additions and 2 deletions
|
@ -811,8 +811,8 @@ attributes:
|
||||||
|
|
||||||
.. method:: regex.search(string[, pos[, endpos]])
|
.. method:: regex.search(string[, pos[, endpos]])
|
||||||
|
|
||||||
Scan through *string* looking for a location where this regular expression
|
Scan through *string* looking for the first location where this regular
|
||||||
produces a match, and return a corresponding :ref:`match object
|
expression produces a match, and return a corresponding :ref:`match object
|
||||||
<match-objects>`. Return ``None`` if no position in the string matches the
|
<match-objects>`. Return ``None`` if no position in the string matches the
|
||||||
pattern; note that this is different from finding a zero-length match at some
|
pattern; note that this is different from finding a zero-length match at some
|
||||||
point in the string.
|
point in the string.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue