1.1. 使用re.findall提取数字 从文本中提取数字,可以用findall来查找: import re text = "The price is 99.99 and the quantity is 100." numbers = re.findall(r'\d+', text) # 提取所有数字 float_numbers = re.findall(r'\d+\.\d+', text) # 提取所有浮点数 print('只提取所有整数的方法是...