From: Ezio Melotti Date: Sun, 29 Apr 2012 08:47:28 +0000 (+0300) Subject: #14519: fix the regex used in the scanf example. X-Git-Tag: v3.3.0a3~40^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a0b1d1eea2aed2ed04b8cf62f2d34038e1bfc9b6;p=python #14519: fix the regex used in the scanf example. --- 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 ::