Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^.*((?<req_method>GET|POST|PUT|DELETE|CONNECT|OPTIONS|HEAD[^ ]\w+)\s*(?<req_path>[^ ][-._?=%&\/[:alnum:]]*)\s*(?<req_protocol>[^ ][.\/\dHTFSP]+){0,1})|(\s*(status:\s*(?<req_status>[^ ]\d+))\s*(len:\ (?<req_len>[^ ]\d+)){0,1}\s*(time:\s*(?<req_time>[^ ][.\d]+)){0,1}\s*(microversion:\s*(?<req_mver>[^ ][.\d]+)){0,1}){0,1}$
/
mxg

Description

http message statement, as for example in openstack log, key: message

Submitted by anonymous - 7 years ago