使用python 打开文件并作匹配处理

import os import re import string file = open("data2.txt") p1 = re.compile(r"^(\d{16})\s+(\d{3})") re.compile(p1) for line in file: print(line) match1 = re.search(p1,line) #
相关文章
相关标签/搜索