Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(\d){1,2}\/(\d){1,2}\/(\d){1,4}\s(\d){1,2}:(\d){1,2}:(\d){1,2}\.(\d){1,8}\s\[(?<host>.*?)\]\sTook\s+(?<NumSources>\d+)\s+sources\s+(?<seconds>(\d+\.\d+|\d+))\s+seconds\sto\scollect\s(?<numlogs>\d+)\s+logs\s+\-\s+avg\s(?<avg>(\d+\.\d+|\d+)).*?$
/
gm

Description

Log collection performance and rate information.

Submitted by anonymous - 5 years ago