m = re.match(r"(..)+", "a1b2c3")  # Matches 3 times.m.group(1)                        # Returns only the last match.'c3'm.group(0)'a1b2c3'm.groups()
('c3',)注意到pattern中的+,应该是匹配偶数个字符.
1.首先是match的问题.match是从开头匹配,为什么会匹配到c3呢?
2.group(0)是整个匹配项,为什么groups()中没有呢?
 莫回无
莫回无 
					噜噜哒
 
					翻阅古今
 
					慕妹3242003
 随时随地看视频慕课网APP
随时随地看视频慕课网APP
相关分类