summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2011-03-12 11:42:33 +0800
committerSenthil Kumaran <orsenthil@gmail.com>2011-03-12 11:42:33 +0800
commite858bca35648bfdd817c51bbea53cb968b626a8d (patch)
treec85726bff91738a37f62592df485477ea92da1c4
parentdd8f2e7edf1e8221398310ff34e4fc5e862a5471 (diff)
parentabd4a0556142e971c22d23243bacd3f0ad6d2299 (diff)
downloadcpython-git-e858bca35648bfdd817c51bbea53cb968b626a8d.tar.gz
forward merge from 3.1
-rw-r--r--Doc/library/re.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 423540c48b..3e9cf026f0 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -295,11 +295,12 @@ The special characters are:
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@host.com>'`` as well as
- ``'user@host.com'``, but not with ``'<user@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@host.com>'`` as well as ``'user@host.com'``, but
+ not with ``'<user@host.com'`` nor ``'user@host.com>'`` .
The special sequences consist of ``'\'`` and a character from the list below.