]> granicus.if.org Git - python/commitdiff
#5241: document missing A in regex howto.
authorGeorg Brandl <georg@python.org>
Tue, 31 Mar 2009 18:41:03 +0000 (18:41 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 31 Mar 2009 18:41:03 +0000 (18:41 +0000)
Doc/howto/regex.rst

index 3ed53686d36e3eb1aa0015fd6eb715f7995babd0..262386781d28005861bfe0905c36ebde0d25be8c 100644 (file)
@@ -540,6 +540,10 @@ of each one.
 | :const:`VERBOSE`, :const:`X`    | Enable verbose REs, which can be organized |
 |                                 | more cleanly and understandably.           |
 +---------------------------------+--------------------------------------------+
+| :const:`ASCII`, :const:`A`      | Makes several escapes like ``\w``, ``\b``, |
+|                                 | ``\s`` and ``\d`` match only on ASCII      |
+|                                 | characters with the respective property.   |
++---------------------------------+--------------------------------------------+
 
 
 .. data:: I
@@ -594,6 +598,15 @@ of each one.
    newline; without this flag, ``'.'`` will match anything *except* a newline.
 
 
+.. data:: A
+          ASCII
+   :noindex:
+
+   Make ``\w``, ``\W``, ``\b``, ``\B``, ``\s`` and ``\S`` perform ASCII-only
+   matching instead of full Unicode matching. This is only meaningful for
+   Unicode patterns, and is ignored for byte patterns.
+
+
 .. data:: X
           VERBOSE
    :noindex: