From 9395ca40f27a3e3c436ad1796c9194343511f057 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Wed, 24 May 2017 00:08:41 -0700 Subject: added re.UNICODE effects to insensitive flags (#1781) --- Doc/library/re.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Doc/library/re.rst b/Doc/library/re.rst index f01887a..d0798b7 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -486,7 +486,9 @@ form. IGNORECASE Perform case-insensitive matching; expressions like ``[A-Z]`` will match - lowercase letters, too. This is not affected by the current locale. + lowercase letters, too. This is not affected by the current locale. To + get this effect on non-ASCII Unicode characters such as ``ü`` and ``Ü``, + add the :const:`UNICODE` flag. .. data:: L @@ -517,8 +519,9 @@ form. .. data:: U UNICODE - Make ``\w``, ``\W``, ``\b``, ``\B``, ``\d``, ``\D``, ``\s`` and ``\S`` dependent - on the Unicode character properties database. + Make the ``\w``, ``\W``, ``\b``, ``\B``, ``\d``, ``\D``, ``\s`` and ``\S`` + sequences dependent on the Unicode character properties database. Also + enables non-ASCII matching for :const:`IGNORECASE`. .. versionadded:: 2.0 -- cgit v0.12