Team Ai
Apppublic

errorcode418/php

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
ApacheCommonLogFormatReader.php38 linesDownload Raw Back to Logfile
1<?php2/**3 * ua-parser4 *5 * Copyright (c) 2011-2012 Dave Olsen, http://dmolsen.com6 *7 * Released under the MIT license8 */9namespace UAParser\Util\Logfile;10 11class ApacheCommonLogFormatReader extends AbstractReader12{13    protected function getRegex()14    {15        return '@^16            (?:\S+)                                                 # IP17            \s+18            (?:\S+)19            \s+20            (?:\S+)21            \s+22            \[(?:[^:]+):(?:\d+:\d+:\d+) \s+ (?:[^\]]+)\]            # Date/time23            \s+24            \"(?:\S+)\s(?:.*?)                                      # Verb25            \s+26            (?:\S+)\"                                               # Path27            \s+28            (?:\S+)                                                 # Response29            \s+30            (?:\S+)                                                 # Length31            \s+32            (?:\".*?\")                                             # Referrer33            \s+34            \"(?P<userAgentString>.*?)\"                            # User Agent35        $@x';36    }37}38