import res = '2019年 5月 30日,上证指数开盘 2894.83点,收盘 2914.70点,涨幅+0.16%,成交量 1.99亿'nums = re.findall(r'\d+(?:\.\d+)?', s)print(nums)