Splunk Search

Using OR with regex

bosseres
Contributor

Hello,

Is it possible to user OR with regex?

For example i have search | regex something="", and I need | regex something="" OR | regex something2=""

Maybe should I change construction? Any ideas?

 

Thank you.

Labels (2)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

That's when you use alternative match in regex

| regex "something1|something2"

bosseres
Contributor

important note, I cant merge regular expressions, because they can be in different order.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...