PyDocs

Nav

Text Processing Services

Pattern.fullmatch

re

method of Pattern · Added in 3.4
  • Pattern.fullmatch(string[, pos[, endpos]])
Matches against all of the string.
1 Example
>>> pattern = re.compile("o[gh]")
>>> pattern.fullmatch("dog")      # No match as "o" is not at the start of "dog".
>>> pattern.fullmatch("ogre")     # No match as not the full string matches.
>>> pattern.fullmatch("doggie", 1, 3)   # Matches within given limits.
<re.Match object; span=(1, 3), match='og'>
from the Python docs
See Also
No see-alsos for re/Pattern.fullmatch
0 Notes
No notes for Pattern.fullmatch