Splunk Search

Filed extraction assistance

gerald_huddlest
Path Finder

iam trying to extarct the room name fromt eh string below but the automatioc filed extraction does not fined enough examples due to numerous other messages in logs.

"chat://room/domain/roomname"

I created a filed extraction to extract the domain, called domain but am not able to get splunk to extract the room name.

need to extract all characters between the last / and the ".

appreciate your help

Tags (1)
0 Karma

Damien_Dallimor
Ultra Champion

Here is a very simple regex , to get you started, that will extract the roomname value out to the field "roomname_field"

"chat://\w+/\w+/(?<roomname_field>\w+)"

Without seeing a sample of many possible values I dont know what characters could be in the room, domain and roomname path parts. \w just captures [a-zA-Z_0-9] . Adjust as necessary.

Get Updates on the Splunk Community!

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...