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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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