# 匹配 import re res = '你的上次登录时间是 2023-06-29 15:54:44' match_obj = re.match(r'你的上次登录时间是 (.*)', res, re.M | re.I) print(match_obj.group(1))