Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^(?P<log_time>[\dT\-\:]+)\s+(?P<log_host>[\w\-]+)(?:\.[\w\-\.]*\s+|\s+)(?P<log_type>\w+)\s+(?:(?=\()(?P<log_module>[^\)]+\))\s+|)(?:(?=\[)(?P<log_tenant>[^ ]+)\s+|)(?P<log_message>.+)
"
gm

Description

no description available

Submitted by anonymous - 7 years ago