diff -r 5e025dc7d728 Doc/library/re.rst --- a/Doc/library/re.rst Sat Aug 11 21:14:08 2012 +0300 +++ b/Doc/library/re.rst Sat Aug 11 14:18:14 2012 -0500 @@ -533,11 +533,17 @@ .. data:: X VERBOSE - This flag allows you to write regular expressions that look nicer. Whitespace - within the pattern is ignored, except when in a character class or preceded by - an unescaped backslash, and, when a line contains a ``'#'`` neither in a - character class or preceded by an unescaped backslash, all characters from the - leftmost such ``'#'`` through the end of the line are ignored. + This flag allows you to write regular expressions that look + nicer. Whitespace within the pattern is ignored, with three + exceptions: within a character class; when preceded by an unescaped + backslash; and within the initial characters of a ``(?...`` + extension construct (so, for example, ``(?P a | b)`` is a + valid verbose regular expression, but ``(?P a | b)`` is + not). + + In addition, when a line contains a ``'#'`` neither in a character + class or preceded by an unescaped backslash, all characters from + the leftmost such ``'#'`` through the end of the line are ignored. That means that the two following regular expression objects that match a decimal number are functionally equal::