从字符串中获取数字

import re

result_info = re.findall("[0-9]{1,9}", 'Cancel(59)')

result_info1 = re.findall("[0-9]", 'Cancel(59)')


result_info1 = re.findall("[0-9]", '09:30')

print((int("".join(result_info1))))

 

posted @ 2022-12-22 14:02  hello_tree  阅读(31)  评论(0)    收藏  举报