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!

There's No Place Like Chrome and the Splunk Platform

Watch On DemandMalware. Risky Extensions. Data Exfiltration. End-users are increasingly reliant on browsers to ...

The Great Resilience Quest: 5th Leaderboard Update

The fifth leaderboard update for The Great Resilience Quest is out &gt;&gt; &#x1f3c6; Check out the ...

Devesh Logendran, Splunk, and the Singapore Cyber Conquest

At this year’s Splunk University, I had the privilege of chatting with Devesh Logendran, one of the winners in ...