ID EN
Regular Expression

search

Python 3.11

Scan through string looking for the first location where the regular expression pattern produces a match, and return a corresponding Match. 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.

Syntax

PYTHON
re.search(pattern, string, flags=0)

See Also

Match