python如何提取记事本文档中的一个数字
问题描述:
提取DT 的数值
答
import re
s='''this is a test, NPTS= 2647, DT= .0050SEC, abc'''
res=re.findall('.*DT=(.*?),',s)
print(res)
如果对你有帮助,可以点击我这个回答右上方的【采纳】按钮,给我个采纳,谢谢。
答
写正则表达式。