正则匹配

简单的正则匹配

pattern = re.compile(r'a_string.*?b_string') # 从a_string到b_string之间的全部字符
result = pattern.findall(string)

你可能感兴趣的:(正则匹配)