@@ -166,15 +166,15 @@ The special characters are:
166
166
back-tracking when the expression following it fails to match.
167
167
These are known as :dfn: `possessive ` quantifiers.
168
168
For example, ``a*a `` will match ``'aaaa' `` because the ``a* `` will match
169
- all 4 ``'a'``s, but, when the final ``'a' `` is encountered, the
169
+ all 4 ``'a' ``\ s, but, when the final ``'a' `` is encountered, the
170
170
expression is backtracked so that in the end the ``a* `` ends up matching
171
- 3 ``'a'``s total, and the fourth ``'a' `` is matched by the final ``'a' ``.
171
+ 3 ``'a' ``\ s total, and the fourth ``'a' `` is matched by the final ``'a' ``.
172
172
However, when ``a*+a `` is used to match ``'aaaa' ``, the ``a*+ `` will
173
173
match all 4 ``'a' ``, but when the final ``'a' `` fails to find any more
174
174
characters to match, the expression cannot be backtracked and will thus
175
175
fail to match.
176
176
``x*+ ``, ``x++ `` and ``x?+ `` are equivalent to ``(?>x*) ``, ``(?>x+) ``
177
- and ``(?>x?) `` correspondigly .
177
+ and ``(?>x?) `` correspondingly .
178
178
179
179
.. versionadded :: 3.11
180
180
@@ -208,10 +208,10 @@ The special characters are:
208
208
*without * establishing any backtracking points.
209
209
This is the possessive version of the quantifier above.
210
210
For example, on the 6-character string ``'aaaaaa' ``, ``a{3,5}+aa ``
211
- attempt to match 5 ``'a' `` characters, then, requiring 2 more ``'a'``s,
211
+ attempt to match 5 ``'a' `` characters, then, requiring 2 more ``'a' ``\ s,
212
212
will need more characters than available and thus fail, while
213
- ``a{3,5}aa `` will match with ``a{3,5} `` capturing 5, then 4 ``'a'``s
214
- by backtracking and then the final 2 ``'a'``s are matched by the final
213
+ ``a{3,5}aa `` will match with ``a{3,5} `` capturing 5, then 4 ``'a' ``\ s
214
+ by backtracking and then the final 2 ``'a' ``\ s are matched by the final
215
215
``aa `` in the pattern.
216
216
``x{m,n}+ `` is equivalent to ``(?>x{m,n}) ``.
217
217
0 commit comments