Splunk Search

Regex that adds extension to my domain name

egreg7
Engager

I am trying to write a regex that adds extension to my domain name. For example google, I need a regex expression that will return www.google .com

Tags (1)
0 Karma

woodcock
Esteemed Legend

You can append like this:

... | rex field=YourFieldHere mode=sed "s/$/YourExtensionStringHere/"

Or like this:

... | eval YourFieldHere = YourFieldHere . "YourExtensionStringHere"
0 Karma

richgalloway
SplunkTrust
SplunkTrust

What does your raw data look like? In other words, please show us the text you want a regex string to match.

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

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...

Index This | What can you do to make 55,555 equal 500?

April 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...