Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2014-11-30 21:17
Flavor·ECMAScript (JavaScript)

/
(\d{2})\/(\S+)\/(\d{4}):(\d{2}):(\d{2}):(\d{2})\s[+\-](\d{4})
/
Open regex in editor

Description

Parses the common log format into component elements. According to wikipedia, common log is strftime format %d/%b/%Y:%H:%M:%S %z

Submitted by Matt Ingenthron <ingenthr@cep.net>