projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9a0376
)
Fix typo in re.escape documentation (GH-14722)
author
Robert DiPietro
<rdipietro@gmail.com>
Sat, 13 Jul 2019 08:35:04 +0000
(
04:35
-0400)
committer
Xiang Zhang
<angwerzx@126.com>
Sat, 13 Jul 2019 08:35:04 +0000
(16:35 +0800)
Doc/library/re.rst
patch
|
blob
|
history
diff --git
a/Doc/library/re.rst
b/Doc/library/re.rst
index 5ef72b535ce8d46e37d51388b443bf0bb1e2ab5c..158248c3d14794be8ac08375004943e096d764a8 100644
(file)
--- a/
Doc/library/re.rst
+++ b/
Doc/library/re.rst
@@
-942,7
+942,7
@@
form.
>>> print('|'.join(map(re.escape, sorted(operators, reverse=True))))
/|\-|\+|\*\*|\*
- This function
s
must not be used for the replacement string in :func:`sub`
+ This function must not be used for the replacement string in :func:`sub`
and :func:`subn`, only backslashes should be escaped. For example::
>>> digits_re = r'\d+'