Splunk Search

extract a matching string into field

shanyour
New Member

I have an event with a text spans over multiple lines. it has no key-value pattern. the body string has a uuid value. I want to extract only the uuid value into a field named uuid and dispaly them in | table time uuid row

ex.

2016/07/02 11:23:45 error nullpointerexception 123ACA12:2345:6785:DEF1:123890AB12345678 at line number 171

Tags (2)
0 Karma

somesoni2
Revered Legend

Give this a try

your base search | rex "(?<uuid>[0-9:A-z\r\n]+) at line number (?<row>\d+)" | table _time uuid row

https://regex101.com/r/HoJEl2/1

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

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 Certification at ...

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