All Apps and Add-ons

Need to compile a regex for a field

mmohiuddin
Path Finder

I have a field called STATUS that is displaying two values:

STATUS=In

STATUS=IN

I need to create a regex that would extract both the values and create a single field called Status.

Is there a way to do it?

There is an option [c|C] that can be used to ignore case sensitive phrases but I am unable to extract the right regex.

0 Karma

mmohiuddin
Path Finder

I was able to find a fix for my search.

We can use:

| eval STATUS = lower(STATUS) | ..

to merge both the upper case and lower case word results

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Having some sample events would help, but this should get you started. You can also go to www.regex101.com to test regex strings.

... | rex "STATUS=(?P<Status>\w+)" | ...
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...