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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...