Regular Expressions 101

Library entries

flunetd

Vote

0

Regular Expression
pcre

/
^(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? \[(?<time_server>[^\]]*)\] (?<host>[^ ]*) - (?<user>[^ ]*)\\"(?<method>\S+)(?: +(?<path>[^\"]*) +\S*)?" (?<code>[^ ]*) (?<size>[^ ]*) \\"(?<referer>[^\"]*)\\" \\"(?<agent>[^\"]*)\\"rt=(?<request_time>[^ ]*) uct=\\"(?<upstream_connect_time>[^ ]*)\\" uht=\\"(?<upstream_header_time>[^ ]*)\\" urt=\\"(?<upstream_response_time>[^ ]*)\\" uaddr=\\"(?<upstream_addr>[^ ]*)\\" x-forwarded-for=\\"*(?<http_x_forwarded_for>.*)\\"$
/
g

Description

Loading markdown...
Submitted by anonymous - 3 years ago