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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...