diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-09 21:57:55 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-09 21:57:55 (GMT) |
commit | be9a4e5c855188cf146962483e6de942bf154d95 (patch) | |
tree | eb157b3bf22214072f27e64244e0b7439c08e2a3 /Doc/library/re.rst | |
parent | ee73a657455a908102379d3c9bc254676418e10c (diff) | |
download | cpython-be9a4e5c855188cf146962483e6de942bf154d95.zip cpython-be9a4e5c855188cf146962483e6de942bf154d95.tar.gz cpython-be9a4e5c855188cf146962483e6de942bf154d95.tar.bz2 |
Issue #433028: Added support of modifier spans in regular expressions.
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r-- | Doc/library/re.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index dfbedd4..df5b547 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -237,6 +237,16 @@ The special characters are: *cannot* be retrieved after performing a match or referenced later in the pattern. +``(?imsx-imsx:...)`` + (Zero or more letters from the set ``'i'``, ``'m'``, ``'s'``, ``'x'``, + optionally followed by ``'-'`` followed by one or more letters from the + same set.) The letters set or removes the corresponding flags: + :const:`re.I` (ignore case), :const:`re.M` (multi-line), :const:`re.S` + (dot matches all), and :const:`re.X` (verbose), for the part of the + expression. (The flags are described in :ref:`contents-of-module-re`.) + + .. versionadded: 3.7 + ``(?P<name>...)`` Similar to regular parentheses, but the substring matched by the group is accessible via the symbolic group name *name*. Group names must be valid |