Splunk Search

How can I exclude a value if it is equal or less than the number of char?

innoce
Path Finder

I need to exclude the field values if it is less than or equal to 8 characters. For eg: In the field abc, I have the below values in which I need to exclude only (browsers, files, members) 'coz these has equal to or less than 8 characters. And I need to have the other values

abc:
browsers
files
attachment
members
auto-saved
splunk-answers
discussions

Can someone help me on this, please?

gcusello
SplunkTrust
SplunkTrust

Hi @innoce,

you can use eval len, something like this sample:

| makeresults 
| eval ppp="12345678" 
| eval check=if(len(ppp)>8,"OK","NOK") 
| table check

Ciao.

Giuseppe

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| regex abc=".{9}"
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...