Splunk Enterprise

How to remove quotes from Inputlookup?

hillsmtb7
Explorer

Hey All,

I have the following issue.  There is a lookup table I am using within a query in where some items are returned with quotes and some are not.  I have the following query and I need to ensure all the results are returned without quotes.

hillsmtb7_1-1653498339716.png

 

My final query looks as follows:

hillsmtb7_2-1653498482175.png

 

I know these quotes are causing issues with my final lookups.  Any help is greatly appreciated.

 

Labels (1)
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Try something like this (run anywhere sample search, adjust per your need)

| makeresults | eval temp=split("This is #sample #search with format# command","#") | table temp| mvexpand temp | rename temp as search | format | eval search=replace(search,"\"","")

View solution in original post

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try something like this (run anywhere sample search, adjust per your need)

| makeresults | eval temp=split("This is #sample #search with format# command","#") | table temp| mvexpand temp | rename temp as search | format | eval search=replace(search,"\"","")
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The values are quoted if they contain, for example, spaces. You could the spaces with underscores for example before they are returned and perhaps switch them back afterwards?

| eval search=replace(search," ","_")
| format "" "" "" "" "" ""
0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...