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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...