Community Patterns

Community Library Entry

2

Regular Expression
Created·2014-07-22 09:38
Flavor·Python

r"
time=(\d+\-\d+\-\d+\s+\d+:\d+:\d+)\|action=(\w+)\|[f_name=(\S*)]?\|has_accounting=0
"
Open regex in editor

Description

f_name may contain spaces, numbers, characters,... so I would go for a [^|] but then I couldn't use [...]? anymore to match the second line?

Submitted by anonymous