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?

Labels (1)

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 Certification Support Alert | Pearson VUE Outage

Splunk Certification holders and candidates!  Please be advised of an upcoming system maintenance period for ...

Enterprise Security Content Update (ESCU) | New Releases

In September, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...