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
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...