import re

# \d+ 匹配字符串中的数字部分,返回列表

ss = 'adafasw12314egrdf5236qew'
num = re.findall('\d+',ss)
print(num)
#运行结果
#['12314', '5236']

\d+使用匹配数字

相关文章:

  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-08-17
  • 2022-12-23
  • 2021-12-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
相关资源
相似解决方案