(pat,re.I).search(s)
print(r)
# 表明字符串的开头在匹配列表中
7 使用正则提取单词...matching', ' operations', ' similar', ' to', ' those', ' found', ' in', ' Perl']
8 只捕获单词,去掉空格
使用()捕获...', 'operations', 'similar', 'to', 'those', 'found', 'in', 'Perl']
9 补充上第一个单词
上面第8,看到提取单词中未包括第一个单词,使用...', 'operations', 'similar', 'to', 'those', 'found', 'in', 'Perl']
11 提取以m或t开头的单词,忽略大小写
下面出现的结果不是我们想要的..., 'those']
12 使用^查找字符串开头的单词
综合11和12得到所有以m或t开头的单词
s = 'This module provides regular expression matching