Skip to content

Commit 82aaef0

Browse files
committed
Fix example and typo
1 parent 42c474e commit 82aaef0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/re.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ The special characters are:
205205
*without* establishing any backtracking points.
206206
This is the possessive version of the quantifier above.
207207
For example, on the 6-character string ``'aaaaaa'``, ``a{3,5}+aa``
208-
attempt to match 5 ``'a'`` characters, then, requiring 2 more ``'a'``\ s,
208+
attempts to match 5 ``'a'`` characters, then, requiring 2 more ``'a'``\ s,
209209
will need more characters than available and thus fail, while
210210
``a{3,5}aa`` will match with ``a{3,5}`` capturing 5, then 4 ``'a'``\ s
211211
by backtracking and then the final 2 ``'a'``\ s are matched by the final
@@ -833,8 +833,8 @@ Flags
833833
will be conditionally ORed with other flags. Example of use as a default
834834
value::
835835

836-
def myfunc(text, flag=re.NOFLAG):
837-
return re.search(text, flag)
836+
def myfunc(pattern, text, flag=re.NOFLAG):
837+
return re.search(pattern, text, flag)
838838

839839
.. versionadded:: 3.11
840840

0 commit comments

Comments
 (0)