Splunk Search

What is the correct syntax of applying NOT operator in transforms.conf?

pavanae
Builder

The following is the regex I am working on and what I'm trying to do is exclude any username events that ends with "ZLX" but I doubt that If I am following the right syntax. especially I am not sure if I can use "!" for excluding.

REGEX = (logtype::A.*(id::(123|456)|(id::789.*username!::[a-zA-Z]{2,3}-+.*?-ZLX))
0 Karma

rahulbhatia
Path Finder

"(?(<)! sub expression)" regex for negative look behind (remove the bracket before and after less then sign)

"(?! sub expression)" regex for negative look ahead

this might help you to update your regex accordingly

0 Karma

jawaharas
Motivator

Can you post sample log events?

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

&#x1f5e3; You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...