Title |
Test
Find
Pattern Title
|
Expression |
\d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3}\s.\s.\s\[\d{2}\/\D{3}\/\d{4}:\d{1,2}:\d{1,2}:\d{1,2}\s.\d{4}\]\s\"\S*\s\S*\s\S*\"\s\d{1,3}\s\S*\s\".*\"\s\".*\" |
Description |
This RegExp makes sure a line in a log file matches the Apache Common log format:
LogFormat "%h %l %u %t \"%r\" %>s %b" common.
It is not very strict on what appears in the 'page', 'referer' or 'agent' fields, as this text can vary massively, plus it keeps the RegExp as fast as possible...
It was useful for me to check that logfiles on the server can be parsed by Log Analysis software I'm writing.
I hope someone finds it useful. |
Matches |
65.93.238.74 - - [12/May/2005:12:37:11 -0400] "GET /dpstyle.css HTTP/1.1" 304 - "http |
Non-Matches |
Have found any yet... |
Author |
Rating:
rich hayes
|
Source |
|
Your Rating |
|
Title: Good
Name: Vladekk
Date: 1/25/2007 2:36:11 PM
Comment:
Works good, thanx