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!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...