Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2020-12-01 14:11
Flavor·Python

r"
(?:[^:\n]*:){4}\w+\s(?P<logHost>\S+)(?:(\s+\w+-)|(\s+))(?P<tst>(\w+))(?:.*)user\s+(?P<username>\S+)
"
gm
Open regex in editor

Description

2 different linux logs parsed by one regex

Submitted by anonymous