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!

3 Ways to Make OpenTelemetry Even Better

My role as an Observability Specialist at Splunk provides me with the opportunity to work with customers of ...

What's New in Splunk Cloud Platform 9.2.2406?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2406 with many ...

Enterprise Security Content Update (ESCU) | New Releases

In August, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...