Splunk Search

How can I split a string for a field?

tonifrommknecht
Engager

How can I split a string from a field?
Example:
url="https://www.google.de/images/hpp/ic_wahlberg_product_core_48.png8.png"

--> url="https://www.google.de"

I have to extract the Website itself from the whole link every time...

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

One way to do it is with rex.

... | rex field=url "(?P<website>https?:\/\/[^\/]+)\/" | ...
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

One way to do it is with rex.

... | rex field=url "(?P<website>https?:\/\/[^\/]+)\/" | ...
---
If this reply helps you, Karma would be appreciated.
0 Karma
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 ...