Splunk Search

Having trouble with field extractor on 7.0

greggz
Communicator

I have ton a couple of events like this:

Mime.stuff.1 = 10
Mime.pop = "blabla"

Basically I want to create a field "MimeProperty" and the require is to begin with a "Mime.". I'm having trouble working with the extractor as I don't fully understand it. Can anyone point me in the right direction ? Thanks in advance

0 Karma
1 Solution

mayurr98
Super Champion

Try this :

index=your_index | rex field=_raw "Mime.*\=\s(|\")(?P<MimeProperty>[^\s|\"]+)"

Let me know if it helps!!

If you get improper output then pls provide some sample events. like there is a confusion of space after "="
in every event.

View solution in original post

0 Karma

mayurr98
Super Champion

Try this :

index=your_index | rex field=_raw "Mime.*\=\s(|\")(?P<MimeProperty>[^\s|\"]+)"

Let me know if it helps!!

If you get improper output then pls provide some sample events. like there is a confusion of space after "="
in every event.

0 Karma

greggz
Communicator

@mayurr98 Nice it works plenty! Post as an answer for me to mark it as correct

0 Karma

mayurr98
Super Champion

You are welcome,
i have converted Please accept!

0 Karma

mayurr98
Super Champion

can you please elaborate on more sample events?
also what do you want to extract? 10 and blabla?

0 Karma

greggz
Communicator

Those would be the values yes. I wan't every field that's starts off with Mime

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...