Splunk Search

Grouping of value

kelz
Explorer

Hello guys,

I need help building the query for this value to group it like the output I have given below.

Current:
apple1
apple-orange
apple-yellow
banna123
banna-red
banna-orange

Output:

apple*
banna*

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| makeresults
| eval _raw="apple1
apple-orange
apple-yellow
banna123
banna-red
banna-orange"
| multikv noheader=t
| table Column_1
| rename Column_1 as _raw


| rex "(?<fruit>[a-zA-Z]+)"

The rex puts the fruit into a field which you can then group by as you need

View solution in original post

kelz
Explorer

Thank you @ITWhisperer 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| makeresults
| eval _raw="apple1
apple-orange
apple-yellow
banna123
banna-red
banna-orange"
| multikv noheader=t
| table Column_1
| rename Column_1 as _raw


| rex "(?<fruit>[a-zA-Z]+)"

The rex puts the fruit into a field which you can then group by as you need

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...