贪婪
str = [abc[def]gh] pat = r"([.*])" result = re.findall(pat, str,re.M) pringt(result) >>> [abc[def]gh]
非贪婪
str = [abc[def]gh] pat = r"([.*?])" result = re.findall(pat, str,re.M) pringt(result) >>> [abc[def]