Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?P<client_ip>[\d.]+) - - \[(?P<timestamp>.*?)\] "(?P<request_method>\w+) (?P<request_uri>.*?) (?P<protocol>.*?) (?P<protocol_version>.*?)" (?P<status>\d+) (?P<response_size>\d+|-) "(?P<referrer>.*?)" "(?P<user_agent>.*?)"
/
gm

Description

Read a line from the splunk tutorial www1 log

Submitted by Russ Ferriday - 2 years ago (Last modified 2 years ago)