下面的代码将匹配预期的输出:import retxt = "This is Phineas. He's a mystical boy. Only ever appears in 960/700 the hole of a donut. 13.5/10 (it can be 13/10 also)"pattern = re.compile(r'(\d{1,2}.?\d?)/\d{2}\s')res = re.finditer(pattern, txt)for r in res: print(r.group(1))