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 Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...