Installation

Regex

Khuzair81
Path Finder

Hi All,

Please help me to solve this.

desc="Trigger App : Search [Abc_[qwert] asd] number" 

I want to fetch the "[Abc_[qwert] asd]" from the above string

Thanks

Labels (1)
0 Karma
1 Solution

scelikok
SplunkTrust
SplunkTrust

Hi @Khuzair81,

Please try below;

| rex field=desc "(?<new_field>\[.+[^\]].*\])"
If this reply helps you an upvote and "Accept as Solution" is appreciated.

View solution in original post

Bigslee
New Member

try using https://regex101.com . You can test your regex statements prior to using them on splunk

0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @Khuzair81,

Please try below;

| rex field=desc "(?<new_field>\[.+[^\]].*\])"
If this reply helps you an upvote and "Accept as Solution" is appreciated.

Khuzair81
Path Finder

@scelikokThankyou 

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...