@@ -989,14 +989,14 @@ The syntax for a named group is one of the Python-specific extensions:
989989``(?P<name>...) ``. Named groups behave exactly like capturing groups, and
990990additionally associate *name * with the group so that *name * can be used to
991991refer to the group in other contexts. Names should look like a Python
992- identifier andonly  contain letters, digits and underscores. The :ref: `match 
992+ identifier and only  contain letters, digits and underscores. The :ref: `match 
993993object <match-objects>` methods that deal with capturing groups all accept
994994either integers that refer to the group by number or strings that contain the
995995desired group's name. Named groups are still given numbers, so you can
996996retrieve information about a group in two ways::
997997
998998   >>> p = re.compile(r'(?P<word>\b\w+\b)') 
999-    >>> m = p.search(  '((( Lots of punctuation )))'  ) 
999+    >>> m = p.search('((( Lots of punctuation )))') 
10001000   >>> m.group('word') 
10011001   'Lots' 
10021002   >>> m.group(1) 
@@ -1022,8 +1022,8 @@ module::
10221022           r' (?P<zonen>[-+])(?P<zoneh>[0-9][0-9])(?P<zonem>[0-9][0-9])' 
10231023           r'"') 
10241024
1025- It's much easier to write ``m.group('zonem') ``,  instead of having
1026- to remember to  retrieve group 9.
1025+ It's much easier to write ``m.group('zonem') `` instead of having
1026+ to count groups so as to verify we must  retrieve group 9.
10271027
10281028The syntax for backreferences in an expression such as ``(...)\1 `` refers to the
10291029number of the group.  There's naturally a variant that uses the group name
0 commit comments