From: Brian Ward Date: Wed, 24 May 2017 07:08:41 +0000 (-0700) Subject: added re.UNICODE effects to insensitive flags (#1781) X-Git-Tag: v2.7.14rc1~131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9395ca40f27a3e3c436ad1796c9194343511f057;p=python added re.UNICODE effects to insensitive flags (#1781) --- diff --git a/Doc/library/re.rst b/Doc/library/re.rst index f01887af64..d0798b78f2 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