fixing regex to work on one or more spaces in the date
This commit is contained in:
Родитель
5e8e0f5ff3
Коммит
dce036ca24
|
@ -9,7 +9,7 @@ class RawLogParser:
|
|||
def parse(self, line):
|
||||
# This regex takes a raw log and parses it into a few elements
|
||||
# time, server, process, and arbitrary remainder
|
||||
pattern = r'^(\w+ \d+ \d+:\d+:\d+) ([a-zA-Z0-9\.]+) (\w+\[\d+\]): conn=(\d+) (.*)$'
|
||||
pattern = r'^(\w+ +\d+ \d+:\d+:\d+) ([a-zA-Z0-9\.]+) (\w+\[\d+\]): conn=(\d+) (.*)$'
|
||||
match = re.search(pattern, line)
|
||||
|
||||
if match:
|
||||
|
|
Загрузка…
Ссылка в новой задаче