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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...