]> granicus.if.org Git - python/commitdiff
#14519: fix the regex used in the scanf example.
authorEzio Melotti <ezio.melotti@gmail.com>
Sun, 29 Apr 2012 08:47:28 +0000 (11:47 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Sun, 29 Apr 2012 08:47:28 +0000 (11:47 +0300)
Doc/library/re.rst

index d97c937293282a48e1337d2d4ec87cdc9ede7a45..8397aad1cf932a64dba530b78a482f7f5c03596b 100644 (file)
@@ -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 ::