Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?P<request_date>^[\w\/\:]+)\s+(?P<request_offset>[\d\+]+)\s+\[(?P<request_id>.+)\]\s+(?P<request_inout>[\-\>\<]+)\s+((?P<request_method>[GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH]+)?\s+(?P<request_path>[^;][^;][a-zA-Z0-9\/\_\-\.\=\@\:\%\+\~\#\?\&\{\}\[\]\|]+)\s+(?P<request_protocol>.+)\s+|(?P<request_code>\d+)\s+(?P<request_filetype>.+)\s+(?P<request_duration>[\d\w]+)\s+)
/
gm

Description

RegEx to extract fields in SPLUNK for AEM Authors and Publishers for the request.log.

Submitted by Robert Wunsch - 4 years ago (Last modified 4 years ago)