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!

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