Hello I have a logs example:
x.xx.xxx.xx - username [06/Mar/2014:14:22:24 +0400] "GET /folder/folder1/file.php HTTP/1.1" 200 246
I use apache-log-parser.php
Standard pattern for preg_match log file is wrong.
preg_match("/^(\S+) (\S+) (\S+) \[([^:]+):(\d+:\d+:\d+) ([^\]]+)\] \"(\S+) (.*?) (\S+)\" (\S+) (\S+) (\".*?\") (\".*?\")$/", $line, $matches);
Please help with reg_exp
.
Just remove the last parts:
preg_match("/^(\S+) (\S+) (\S+) \[([^:]+):(\d+:\d+:\d+) ([^\]]+)\] \"(\S+) (.*?) (\S+)\" (\S+) (\S+)$/", $line, $matches);