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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...