Python正则表达式匹配数字和小数 1、匹配数字 import re str_date = 'hello world today is 2022.4.15 ok' num_list = re.findall('\d+', str_date) print('匹配到的数字', num_list) </