Regular Expressions 101

Community Patterns

Read a line from the splunk tutorial www1 log

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 - a year ago (Last modified a year ago)