Regular Expressions 101

Community Patterns

Community Library Entry

-2

Regular Expression
ECMAScript (JavaScript)

/
^(\S+) (\S+) \[([\w:/]+\s[+\-]\d{4})\] ([\d.]+) (\S+) (\S+) (\S+) (\S+) \\?"(.+?)\\?" (\d{3}) (\S+) (\S+) (\S+) (\d+) (\S+) \\?"(.+?)\\?" \\?"(.+?)\\?" (\S+)
/

Description

An updated S3 log analyzer. I found that my logs sometimes had strings quoted, so I needed to add possible handling for that.

Submitted by Matt Ingenthron <ingenthr@cep.net> - 10 years ago