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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...