PyDocs

Nav

Text Processing Services

search

re

function (source)
  • search(pattern, string, flags=0)
Scan through string looking for a match to the pattern, returning
a Match object, or None if no match was found.
1 Example
>>> re.search(r"\W(.)\1\W", " ff ")
<re.Match object; span=(0, 4), match=' ff '>
>>> re.search("\\W(.)\\1\\W", " ff ")
<re.Match object; span=(0, 4), match=' ff '>
from the Python docs
See Also
No see-alsos for re/search
0 Notes
No notes for search