diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-14 15:21:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 15:21:26 (GMT) |
commit | b0b44b4b3337297007f5ef87220a75df204399f8 (patch) | |
tree | 1cf8101aff540cc7ceae9015ddbf2227beda3cc8 | |
parent | e1d62e0b7cc842d6b75b4d480391f4a94e503255 (diff) | |
download | cpython-b0b44b4b3337297007f5ef87220a75df204399f8.zip cpython-b0b44b4b3337297007f5ef87220a75df204399f8.tar.gz cpython-b0b44b4b3337297007f5ef87220a75df204399f8.tar.bz2 |
bpo-15606: Improve the re.VERBOSE documentation. (#4366)
-rw-r--r-- | Doc/library/re.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index e0cb626..cbb2f43 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -617,7 +617,8 @@ form. This flag allows you to write regular expressions that look nicer and are more readable by allowing you to visually separate logical sections of the pattern and add comments. Whitespace within the pattern is ignored, except - when in a character class or when preceded by an unescaped backslash. + when in a character class, or when preceded by an unescaped backslash, + or within tokens like ``*?``, ``(?:`` or ``(?P<...>``. When a line contains a ``#`` that is not in a character class and is not preceded by an unescaped backslash, all characters from the leftmost such ``#`` through the end of the line are ignored. |