Splunk Search

How to extract a field with double quote?

sandra_ginger
Engager

I am new to splunk, I have event like below, the URL value has two double quote, when I extract the URL value, it always show empty value. Is there a way to remove outside double quotes?

2023-04-20T16:06:08.595+0000 SFDCLogType="ApexCallout" EVENT_TYPE="ApexCallout" TIMESTAMP="20230420160608.595" REQUEST_ID="TID:606896510000061f42" RUN_TIME="45" CPU_TIME="-1" URI="CALLOUT-LOG"  TYPE="OData" METHOD="GET" SUCCESS="0" TIME="35" REQUEST_SIZE="-1" RESPONSE_SIZE="0" URL=""https://XXX.test.com:443/api/service/"" TIMESTAMP_DERIVED="2023-04-20T16:06:08.595Z"

Labels (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

You'll have to extract it manually.  I like using rex for that.

| rex "URL=\\\"\\\"(?<URL>[^\\\"]+)"

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

sandra_ginger
Engager

@richgalloway  That works, thank you!

richgalloway
SplunkTrust
SplunkTrust

You'll have to extract it manually.  I like using rex for that.

| rex "URL=\\\"\\\"(?<URL>[^\\\"]+)"

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...