]> granicus.if.org Git - python/commitdiff
added re.UNICODE effects to insensitive flags (#1781)
authorBrian Ward <bri@aem7.net>
Wed, 24 May 2017 07:08:41 +0000 (00:08 -0700)
committerGregory P. Smith <greg@krypto.org>
Wed, 24 May 2017 07:08:41 +0000 (00:08 -0700)
Doc/library/re.rst

index f01887af64cd795ec5296ff8c75236065a01b8f6..d0798b78f2ec77a2ae3229f3e79261b21f6c43a0 100644 (file)
@@ -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