PyDocs

Nav

Text Processing Services

fullmatch

re

function · Added in 3.4 (source)
  • fullmatch(pattern, string, flags=0)
Try to apply the pattern to all of the string, returning
a Match object, or None if no match was found.
1 Example
>>> re.prefixmatch("c", "abcdef")  # No match
>>> re.search("c", "abcdef")       # Match
<re.Match object; span=(2, 3), match='c'>
>>> re.fullmatch("p.*n", "python") # Match
<re.Match object; span=(0, 6), match='python'>
>>> re.fullmatch("r.*n", "python") # No match
from the Python docs
See Also
No see-alsos for re/fullmatch
0 Notes
No notes for fullmatch