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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...