Splunk Search

How to extract language field

martin_mueller
SplunkTrust
SplunkTrust

Converted from http://answers.splunk.com/answers/193524/how-to-write-a-search-to-return-events-with-a-vari.html

Hi,

i want to extract this field language:

language:ru-ru

can you please help me what regular expression should i write?

Thanks,
Snabel

1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Try this:

language:(?<language>\w+-?\w*)

In the long run you should consider setting up key-value extraction around the colon instead of the equals sign.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Try this:

language:(?<language>\w+-?\w*)

In the long run you should consider setting up key-value extraction around the colon instead of the equals sign.

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

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, ...