/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Complete Expression for a standard stats log ^(?<Date>(?<Year>\d{4}|\d{2})-(?<Month>\d{1,2})-(?<Day>\d{1,2}))\s(?<Time>(?<Hour>\d{1,2}):(?<Minute>\d{1,2}):(?<Second>\d{1,2}))\s(?<ClientIP>(?<A>\d{1,3})\.(?<B>\d{1,3})\.(?<C>\d{1,3})\.(?<D>\d{1,3}))\s(?<Username>[\w-]*)\s(?<Method>\w*)\s(?<URI>[\w/-_\.+]*)\s(?<StatusCode>\d{3})\s(?<Bytes>\d*)\s(?<Version>[\w/-_\.+]*)\s(?<UserAgent>[\w/-_\.+;()]*|-)\s(?<Referer>[\w\.-_://]*|-) Complete Expression for a standard stats log with URI broken into prefix and extension ^(?<Date>(?<Year>\d{4}|\d{2})-(?<Month>\d{1,2})-(?<Day>\d{1,2}))\s(?<Time>(?<Hour>\d{1,2}):(?<Minute>\d{1,2}):(?<Second>\d{1,2}))\s(?<ClientIP>(?<A>\d{1,3})\.(?<B>\d{1,3})\.(?<C>\d{1,3})\.(?<D>\d{1,3}))\s(?<Username>[\w-]*)\s(?<Method>\w*)\s(?<URI>(?<Prefix>[\w/-_\.+]*)\.(?<Ext>\w{0,8}))\s(?<StatusCode>\d{3})\s(?<Bytes>\d*)\s(?<Version>[\w/-_\.+]*)\s(?<UserAgent>[\w/-_\.+;()]*|-)\s(?<Referer>[\w\.-_://]*|-) Pieces: Date (?<Date>(?<Year>\d{4}|\d{2})-(?<Month>\d{1,2})-(?<Day>\d{1,2})) Time (?<Time>(?<Hour>\d{1,2}):(?<Minute>\d{1,2}):(?<Second>\d{1,2})) IP Address UserName (?<Username>[\w-]*) Method (?<Method>\w*) URI (?<URI>[\w/-_\.+]*) (?<URI>(?<Prefix>[\w/-_\.+]*)\.(?<Ext>\w{0,8})) StatusCode (?<StatusCode>\d{3}) Bytes (?<Bytes>\d*) Version (?<Version>[\w/-_\.+]*) UserAgent (?<UserAgent>[\w/-_\.+;()]*|-) Referrer (?<Referer>[\w\.-_://]*|-)