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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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