Splunk Search

case insensitive transforms.conf

EricPartington
Communicator

is there a way to have case sensitive matches for transforms.conf?

I have a regex setting the sourcetype and index but i require matching some words with case insensitivity. is there a way to match insensitive as you would for a normal regex (i)

REGEX=:\d+\s([O|o|S|s|G|g][HOST|host].*[ABC|abc])[\w\d]+\s[

i would rather use a case insensitive regex if possible.

Tags (2)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

You put(?i) in your regex at the point you want it to be case-insensitive:

REGEX=(?i):d+s([osg][host].*[abc])[wd]+s[

or:

REGEX=:d+s(?i)([osg][host].*[abc])(?-i)[wd]+s[

or:

REGEX=:d+s(?i:([osg][host].*[abc]))[wd]+s[

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

You put(?i) in your regex at the point you want it to be case-insensitive:

REGEX=(?i):d+s([osg][host].*[abc])[wd]+s[

or:

REGEX=:d+s(?i)([osg][host].*[abc])(?-i)[wd]+s[

or:

REGEX=:d+s(?i:([osg][host].*[abc]))[wd]+s[

EricPartington
Communicator

works like a charm, thanks

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...