[Python-checkins] r70861 - python/branches/py3k/Doc/howto/regex.rst

georg.brandl python-checkins at python.org
Tue Mar 31 20:41:03 CEST 2009


Author: georg.brandl
Date: Tue Mar 31 20:41:03 2009
New Revision: 70861

Log:
#5241: document missing A in regex howto.

Modified:
   python/branches/py3k/Doc/howto/regex.rst

Modified: python/branches/py3k/Doc/howto/regex.rst
==============================================================================
--- python/branches/py3k/Doc/howto/regex.rst	(original)
+++ python/branches/py3k/Doc/howto/regex.rst	Tue Mar 31 20:41:03 2009
@@ -540,6 +540,10 @@
 | :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 @@
    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:


More information about the Python-checkins mailing list