使用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) #
相關文章
相關標籤/搜索