2017-11-10 20:56:16, маркера WARNING, ERROR, CRITICAL, № строки и текст должен быть в одну строку
я начал делать, а дальше никак( вот мой код и файл с которого нужно считать. Спасибо!
#-*- coding: utf-8 -*- import re log_name = "openerp-server.txt" resul = "results.txt" input_file = open(log_name, mode='r',encoding='utf-8') resulf = open(resul, mode = 'w+',encoding='utf-8') txt = input_file.readlines() lookfor = r"\d{4}-(\d|1\d)-(\d|1\d|\d)\s\d+(:)\d+(:)\d\d" result = re.search(lookfor, txt) for item in result: print(item)