Regular Expressions 101

Community Patterns

nsv2-general

0

Regular Expression
Python

r"
\#+\< (?P<timestamp>[\w,: ]+)\>\ \< (?P<type>[\w]+)\>\ \< (?P<about>[\w\. \-\/]+)\>\ \< (?P<hostname>[\w\-]+)\>\ \< (?P<source>[\w]+|)\>\ \< (?P<message>[\w\[\]:'\.\(\) -]+)\>\ \< (?P<field1>.+?(?=\>\s)|)\>\ \< (?P<field2>[\w]+|)\>\ \< (?P<field3>[\w\-]+|)\>\ \< (?P<field4>[\w\-]+)\>\ \< (?P<field5>[\w\[\]\-\.\: ]+)\>\ \< (?P<field6>[\w\-]+)\>\ \< (?P<body>[\w\.\,\=\/\:\-\@\"\(\)\[\]\$\#\%\|\;\'\t \n]+)
"
gm

Description

log

Submitted by anonymous - 2 years ago