summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-13 00:26:46 +0000
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-13 00:26:46 +0000
commit9fe1d8af48a2ec90f2a83e8d0c34e17f789c66ea (patch)
tree7ef898b56c69a0134c42aa02ef7b0dc357cb8a27
parentc40969d3232269cbd92b2378ca41e9e2073c46bd (diff)
downloadcpython-git-9fe1d8af48a2ec90f2a83e8d0c34e17f789c66ea.tar.gz
Merged revisions 77455 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77455 | ezio.melotti | 2010-01-13 02:25:03 +0200 (Wed, 13 Jan 2010) | 1 line #7685: typo ........
-rw-r--r--Doc/library/re.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 374e750423..cb1e9f06cc 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -817,16 +817,16 @@ support the following methods and attributes:
A moderately complicated example:
- >>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcom Reynolds")
+ >>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcolm Reynolds")
>>> m.group('first_name')
- 'Malcom'
+ 'Malcolm'
>>> m.group('last_name')
'Reynolds'
Named groups can also be referred to by their index:
>>> m.group(1)
- 'Malcom'
+ 'Malcolm'
>>> m.group(2)
'Reynolds'
@@ -869,9 +869,9 @@ support the following methods and attributes:
the subgroup name. The *default* argument is used for groups that did not
participate in the match; it defaults to ``None``. For example:
- >>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcom Reynolds")
+ >>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcolm Reynolds")
>>> m.groupdict()
- {'first_name': 'Malcom', 'last_name': 'Reynolds'}
+ {'first_name': 'Malcolm', 'last_name': 'Reynolds'}
.. method:: MatchObject.start([group])