File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments