flags]) 列出字符串中模式的所有匹配项
finditer(pattern, string, flags=0) 返回包含所有匹配项的迭代对象,其中每个匹配项都是match对象
fullmatch(pattern...[, maxsplit=0]) 根据模式匹配项分隔字符串
sub(pat, repl, string[, count=0]) 将字符串中所有pat的匹配项用repl替换,返回新字符串,repl可以是字符串或返回字符串的可调用对象...,该可调用对象作用于每个匹配的match对象
subn(pat, repl, string[, count=0]) 将字符串中所有pat的匹配项用repl替换,返回包含新字符串和替换次数的二元元组,repl...\\b', example) #所有单词
['Beautiful', 'is', 'better', 'than', 'ugly']
>>> re.findall('\w+', example) #...所有单词
['Beautiful', 'is', 'better', 'than', 'ugly']
>>> re.findall(r'\b\w.+?