正文
调用方法:
re.findall(pattern, string, flags=0)
用法说明:
扫描整个 字符串,找到所有满足匹配样式的字符,将它们集合在一起以列表形式返回。其中这个返回的列表包含空的结果(没有匹配到的结果)。
示例一
import re
str1 = "The telephone number of police in China is 110, and the telephone number of emergency is 120."
pattern = "\d+"
result = re.findall