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!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...