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!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...