Splunk Search

Regex search through splunk

vplunk
Explorer

Is there a method to do "AND" while writing regex instead of "OR" . As when i write a reg and add to regex _raw="expression". Since using "|" its matching a lot of similar logs . 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

It would help to see some example data and your current query.  However, you may accomplish your goal using where instead of regex.

... | where (match(_raw, "expression") AND match(_raw, "other expression")

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

It would help to see some example data and your current query.  However, you may accomplish your goal using where instead of regex.

... | where (match(_raw, "expression") AND match(_raw, "other expression")

 

---
If this reply helps you, Karma would be appreciated.

vplunk
Explorer

Thank you and it worked .. 

Tags (1)
0 Karma
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 ...