Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?P<datetime>.*?) queries: info: client @[0-9a-fx]* (?P<source_ip>[\w.:]*)#\d+ \(.*\): view (?P<view_name>\w+): query: (?P<domain>[\w.-]+) IN (?P<type>\w+) .*? \((?P<name_server>[\w.:]+)\)
/
gm

Description

It's a simple regexp for dns-query.log

Submitted by anonymous - 2 years ago