Skip to content

Commit faa1208

Browse files
authored
chore/docs: fix rst style and typo (GH-32331)
Current: ![图片](https://user-images.githubusercontent.com/24759802/161704413-30fc91e8-ccd1-4617-8483-bc54ec970f30.png) After this change: ![图片](https://user-images.githubusercontent.com/24759802/161704636-a5458192-a93a-40af-8bde-90ba80fdb53f.png) Trivial so I don't think it needs news or issue Automerge-Triggered-By: GH:JulienPalard
1 parent d0e696e commit faa1208

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Doc/library/re.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ The special characters are:
166166
back-tracking when the expression following it fails to match.
167167
These are known as :dfn:`possessive` quantifiers.
168168
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
170170
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'``.
172172
However, when ``a*+a`` is used to match ``'aaaa'``, the ``a*+`` will
173173
match all 4 ``'a'``, but when the final ``'a'`` fails to find any more
174174
characters to match, the expression cannot be backtracked and will thus
175175
fail to match.
176176
``x*+``, ``x++`` and ``x?+`` are equivalent to ``(?>x*)``, ``(?>x+)``
177-
and ``(?>x?)`` correspondigly.
177+
and ``(?>x?)`` correspondingly.
178178

179179
.. versionadded:: 3.11
180180

@@ -208,10 +208,10 @@ The special characters are:
208208
*without* establishing any backtracking points.
209209
This is the possessive version of the quantifier above.
210210
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,
212212
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
215215
``aa`` in the pattern.
216216
``x{m,n}+`` is equivalent to ``(?>x{m,n})``.
217217

0 commit comments

Comments
 (0)