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!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...