Skip to content

Commit ee5383d

Browse files
committed
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 ........
1 parent 81612e8 commit ee5383d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/library/re.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -849,16 +849,16 @@ support the following methods and attributes:
849849

850850
A moderately complicated example:
851851

852-
>>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcom Reynolds")
852+
>>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcolm Reynolds")
853853
>>> m.group('first_name')
854-
'Malcom'
854+
'Malcolm'
855855
>>> m.group('last_name')
856856
'Reynolds'
857857

858858
Named groups can also be referred to by their index:
859859

860860
>>> m.group(1)
861-
'Malcom'
861+
'Malcolm'
862862
>>> m.group(2)
863863
'Reynolds'
864864

@@ -898,9 +898,9 @@ support the following methods and attributes:
898898
the subgroup name. The *default* argument is used for groups that did not
899899
participate in the match; it defaults to ``None``. For example:
900900

901-
>>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcom Reynolds")
901+
>>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcolm Reynolds")
902902
>>> m.groupdict()
903-
{'first_name': 'Malcom', 'last_name': 'Reynolds'}
903+
{'first_name': 'Malcolm', 'last_name': 'Reynolds'}
904904

905905

906906
.. method:: MatchObject.start(group=0)

0 commit comments

Comments
 (0)