Splunk Search

In Extract Fields: how can you extract Multivalue Field using Regex Code?

moaf13
Path Finder

So I have this:

                    01010101 01/02/2015 4200000  U-55555555-0000  1.00 
               Q CC                100 Random Text with numbers 676
               R BB                2 Another Random Text Message 23$kjaldsf@@

      01010101 01/02/2015 4200000  U-55555555-0000  1.00 
value 1 ==>(Q) CC                100 Random Text with numbers 676
value 2 ==>(R) BB                2 Another Random Text Message 23$kjaldsf@@

I can extract both fields using this in search Rex command _index search ....| rex field=_raw "\s(?[A-z])\s"_
returns the multivalue field i want.
However if i use the same regex during Extract field, it only takes the first value "Q" not the second one. So how can i extract multivalue field using Extract Field option. Let me know if that is even possible, if it is please let me know how?

this is how i wanted it to be

otherField       WantedField        Date                   AnotherField              AnotherMultiValueField ....etc
01010101                 Q          01/02/2015              U-5555555-0000                        CC
                         R                                                                        BB 
Tags (2)
0 Karma
1 Solution

moaf13
Path Finder

I was able to find out the answer, it can be done in Tranforms.config or the rex pipe in search head.

View solution in original post

0 Karma

moaf13
Path Finder

I was able to find out the answer, it can be done in Tranforms.config or the rex pipe in search head.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...