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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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