summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-04-29 11:47:28 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2012-04-29 11:47:28 +0300
commita0b1d1eea2aed2ed04b8cf62f2d34038e1bfc9b6 (patch)
tree7bfde9a28b14dff3325a52c0d671c47ba013666b /Doc
parentb8e336b974dc007346cfa6a9f5042fefb989db27 (diff)
downloadcpython-git-a0b1d1eea2aed2ed04b8cf62f2d34038e1bfc9b6.tar.gz
#14519: fix the regex used in the scanf example.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/re.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index d97c937293..8397aad1cf 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -1072,13 +1072,13 @@ expressions.
+--------------------------------+---------------------------------------------+
| ``%i`` | ``[-+]?(0[xX][\dA-Fa-f]+|0[0-7]*|\d+)`` |
+--------------------------------+---------------------------------------------+
-| ``%o`` | ``0[0-7]*`` |
+| ``%o`` | ``[-+]?[0-7]+`` |
+--------------------------------+---------------------------------------------+
| ``%s`` | ``\S+`` |
+--------------------------------+---------------------------------------------+
| ``%u`` | ``\d+`` |
+--------------------------------+---------------------------------------------+
-| ``%x``, ``%X`` | ``0[xX][\dA-Fa-f]+`` |
+| ``%x``, ``%X`` | ``[-+]?(0[xX])?[\dA-Fa-f]+`` |
+--------------------------------+---------------------------------------------+
To extract the filename and numbers from a string like ::