[Python-checkins] cpython (merge 3.1 -> 3.2): forward merge from 3.1
senthil.kumaran
python-checkins at python.org
Sat Mar 12 04:44:23 CET 2011
http://hg.python.org/cpython/rev/ba2a1064b3dd
changeset: 68392:ba2a1064b3dd
branch: 3.2
parent: 68385:b2a6d1a5e2cf
parent: 68391:d676601fee6f
user: Senthil Kumaran <orsenthil at gmail.com>
date: Sat Mar 12 11:42:33 2011 +0800
summary:
forward merge from 3.1
files:
Doc/library/re.rst
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -295,11 +295,12 @@
match at the beginning of the string being searched.
``(?(id/name)yes-pattern|no-pattern)``
- Will try to match with ``yes-pattern`` if the group with given *id* or *name*
- exists, and with ``no-pattern`` if it doesn't. ``no-pattern`` is optional and
- can be omitted. For example, ``(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)`` is a poor email
- matching pattern, which will match with ``'<user at host.com>'`` as well as
- ``'user at host.com'``, but not with ``'<user at host.com'``.
+ Will try to match with ``yes-pattern`` if the group with given *id* or
+ *name* exists, and with ``no-pattern`` if it doesn't. ``no-pattern`` is
+ optional and can be omitted. For example,
+ ``(<)?(\w+@\w+(?:\.\w+)+)(?(1)>|$)`` is a poor email matching pattern, which
+ will match with ``'<user at host.com>'`` as well as ``'user at host.com'``, but
+ not with ``'<user at host.com'`` nor ``'user at host.com>'`` .
The special sequences consist of ``'\'`` and a character from the list below.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list