r63829 - in python: branches/py3k/Doc/library/re.rst trunk/Doc/library/re.rst
Author: mark.summerfield Date: Sat May 31 15:05:34 2008 New Revision: 63829 Log: Added a note to [] that special forms & special chars lose their meaning and backrefs can't be used inside [] Modified: python/trunk/Doc/library/re.rst Changes in other areas also in this revision: Modified: python/branches/py3k/Doc/library/re.rst Modified: python/trunk/Doc/library/re.rst ============================================================================== --- python/trunk/Doc/library/re.rst (original) +++ python/trunk/Doc/library/re.rst Sat May 31 15:05:34 2008 @@ -181,6 +181,12 @@ ``[^5]`` will match any character except ``'5'``, and ``[^^]`` will match any character except ``'^'``. + Note that inside ``[]`` the special forms and special characters lose + their meanings and only the syntaxes described here are valid. For + example, ``+``, ``*``, ``(``, ``)``, and so on are treated as + literals inside ``[]``, and backreferences cannot be used inside + ``[]``. + ``'|'`` ``A|B``, where A and B can be arbitrary REs, creates a regular expression that will match either A or B. An arbitrary number of REs can be separated by the Diffs of changes in other areas also in this revision: Modified: python/branches/py3k/Doc/library/re.rst ============================================================================== --- python/branches/py3k/Doc/library/re.rst (original) +++ python/branches/py3k/Doc/library/re.rst Sat May 31 15:05:34 2008 @@ -181,6 +181,12 @@ ``[^5]`` will match any character except ``'5'``, and ``[^^]`` will match any character except ``'^'``. + Note that inside ``[]`` the special forms and special characters lose + their meanings and only the syntaxes described here are valid. For + example, ``+``, ``*``, ``(``, ``)``, and so on are treated as + literals inside ``[]``, and backreferences cannot be used inside + ``[]``. + ``'|'`` ``A|B``, where A and B can be arbitrary REs, creates a regular expression that will match either A or B. An arbitrary number of REs can be separated by the
participants (1)
-
mark.summerfield