Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?P<timestamp>\w+\-\w+\-\w+\s\w+\:\w+\:\w+\.\w+)\s(?P<type>\w+)\s\[(?P<details>[\w\s\-\.]+)\]\s(?P<body>[\S\s]*?(?=\w+\-\w+\-\w+\s|\Z))
"
gm

Description

log

Submitted by anonymous - 3 years ago