Splunk Search

What is a REX I can use to create field domain from website?

shreyasamin64
Explorer

REX command to create a field domain from website

EX:  input : https://www.youtube.com/sd/td/gs-intro

        output: www.youtube.com

Labels (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

This should work

 

| rex field=yourfield "//(?<domain>[^/?]*)"

 

 

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

This should work

 

| rex field=yourfield "//(?<domain>[^/?]*)"

 

 

aasabatini
Motivator

Hi @shreyasamin64 

try this

rex "(https:\/\/)(?<domain>\w+.\w+.\w+)"
“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”

pacifiquen
Explorer

Hello Team,

can anyone help me with the extraction of new field

 

input: site: mclaudelinemugasqiln.platinilemu.com:1227

 site is a field

domain is mclaudelinemugasqiln.platinilemu.com:1227

i want this output: mclaudelinemugasqiln.platinilemu.com:1227

Tags (2)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Please start a new topic for a new question

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...