Regular Expressions 101

Community Patterns

0

Special character finder

PCRE2 (PHP >=7.3)
yep
Submitted by anonymous - 4 months ago

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

Loading markdown...
Submitted by Russ Ferriday - 6 months ago
(Last modified 6 months ago)