Skip to content

Commit

Permalink
Use same word in example
Browse files Browse the repository at this point in the history
  • Loading branch information
akuchling committed Sep 25, 2024
1 parent 7a97af3 commit 961a4ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/howto/regex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ The :meth:`~re.Pattern.fullmatch` method checks if the RE matches the entire
string exactly::

>>> p = re.compile('[a-z]+')
>>> p.search(' words ')
<re.Match object; span=(1, 6), match='words'>
>>> p.search(' textual ')
<re.Match object; span=(1, 8), match='textual'>
>>> p.fullmatch(' textual ') # Fails to match and returns None
>>> p.fullmatch('textual')
<re.Match object; span=(0, 7), match='textual'>
Expand Down

0 comments on commit 961a4ef

Please sign in to comment.