Splunk Search

How to extract value under double quotes using the rex command?

saravanafd
Explorer

Has been busy for "639" seconds

using rex command i need to extract value 639 and store it in one field.

Please help !!!

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try this:

... | rex "busy for \"(?<one>\d+)" | ...
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

vnravikumar
Champion

Hi

Try this

| makeresults 
| eval msg ="busy for \"639\" seconds" 
| rex field=msg "\"(?P<seconds>[\d]+)\""
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this:

... | rex "busy for \"(?<one>\d+)" | ...
---
If this reply helps you, Karma would be appreciated.
0 Karma

saravanafd
Explorer

Thank you very much for the resolution. Works perfectly 🙂

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...