Splunk Search

Extract data between curly brackets

Digvijay
Path Finder

I want to extract data between 2 curly brackets {} from below ErrorText string

Digvijay_0-1626174213250.png

 

Labels (1)
0 Karma
1 Solution

venkatasri
SplunkTrust
SplunkTrust

Hi @Digvijay 

Can you try this regex? I assumed your input field as error_text and output will be populated in error_inside.

 

<your_search_goes_here>
| rex field=error_text "\{(?<error_inside>[^\}]+)"

 

--

An upvote would be appreciated and Accept solution if this reply helps!

View solution in original post

Tags (2)

venkatasri
SplunkTrust
SplunkTrust

Hi @Digvijay 

Can you try this regex? I assumed your input field as error_text and output will be populated in error_inside.

 

<your_search_goes_here>
| rex field=error_text "\{(?<error_inside>[^\}]+)"

 

--

An upvote would be appreciated and Accept solution if this reply helps!

Tags (2)

Digvijay
Path Finder

@venkatasri  thank you so much .Perfect solution😊

 

0 Karma
Get Updates on the Splunk Community!

Splunk is Nurturing Tomorrow’s Cybersecurity Leaders Today

Meet Carol Wright. She leads the Splunk Academic Alliance program at Splunk. The Splunk Academic Alliance ...

Part 2: A Guide to Maximizing Splunk IT Service Intelligence

Welcome to the second segment of our guide. In Part 1, we covered the essentials of getting started with ITSI ...

Part 1: A Guide to Maximizing Splunk IT Service Intelligence

As modern IT environments continue to grow in complexity and speed, the ability to efficiently manage and ...