Splunk Search

Hi team, i need to extract the locale field in BOLD , can you help me with it

Hemant1
Explorer

/en_sek/klarna

Labels (1)
0 Karma

paulbannister
Communicator

Hi There,

\/(?P<locale>[^\/]+)\/klarna

Or within the Splunk search itself:

 

|rex field= ##INSERT RELEVANT FIELDNAME## "\/(?P<locale>[^\/]+)\/klarna"

0 Karma

paulbannister
Communicator

Hi There,

If you mean via REGEX then try the following:

\.com\/(?P<locale>[^\/]+)\/


Or within the Splunk search itself:

 

|rex field=_raw "\.com\/(?P<locale>[^\/]+)\/"

 

 

EDIT:
Slightly improved regex to incorporate address such as ".co.uk":

 

((\.\w{2,3}\.\w{2,3})|\.\w{2,3})\/(?P<locale>[^\/]+)\/

or

|rex field=_raw "((\.\w{2,3}\.\w{2,3})|\.\w{2,3})\/(?P<locale>[^\/]+)\/"

0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...