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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...