Regular matching replacement to remove weight is a little difficult to understand, solve

The

problem is as follows, as seen in the python getting started manual, re.sub () replaces
I know the syntax of re.sub (regular string, replacement string, original string), but I don"t understand this

clipboard.png

I also know that 1 is equivalent to re.search (). Group (1)
how does the above rule achieve the effect of removing weight?


(\ b [a-z] +) matches one word
(\ b [a-z] +)\ 1 matches two identical words with a space between them

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3514f-2bf71.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3514f-2bf71.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?