All Apps and Add-ons

Splunk Regex to String period from front and end of domain name match

tbalouch
Path Finder

Hey guys,

I'm having trouble finding a Regex to remove begining and ending from a domain match against my dns logs. For example I have the field extraction SOA\s(?.*$) which gets me the extraction domain=.www.google.com.

I can't figure out how to get rid of the outer periods.

0 Karma

glitchcowboy
Path Finder

Wild guess (without a sample)

SOAs\.(?<domain>[\w\.\d-]+)\.
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please share some sample events.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Ready, Set, SOAR: How Utility Apps Can Up Level Your Playbooks!

 WATCH NOW Powering your capabilities has never been so easy with ready-made Splunk® SOAR Utility Apps. Parse ...

DevSecOps: Why You Should Care and How To Get Started

 WATCH NOW In this Tech Talk we will talk about what people mean by DevSecOps and deep dive into the different ...

Introducing Ingest Actions: Filter, Mask, Route, Repeat

WATCH NOW Ingest Actions (IA) is the best new way to easily filter, mask and route your data in Splunk® ...