Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(?P<ts>\S+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+(?P<status>[^"]+)\s+\S+\s+\S+\s+"(?P<request>[^"]+)\s+HTTP\/\d.\d"\s+"(?P<agent>[^"]+)"\s+-\s+-$
/
ig

Description

ELB log parser

Submitted by Peker Mert Oksuz - 9 years ago