使用python来做正则表达式:
import re
txt = "That will be 60 dollars and the weight is 50 pounds"
#Find all digit characters:
x = re.findall("\d", txt)
print(x)
这个使用了 \ 这个character, 这个character的意思:Signals a special sequence (can also be used to escape special characters).
结果如下:
如果觉得不错,就点赞或者关注或者留言~~
谢谢~