<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Possible to output a literal string with backslashes from a lookup without escaping? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704323#M238674</link>
    <description>&lt;P&gt;I did an inputlookup to get my field (uploads) and used this piece of search I found on another post:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| fields uploads
| rex field=uploads mode=sed "s/(\d+)/%\1/g"
| eval decode=urldecode(uploads)&lt;/LI-CODE&gt;
&lt;P&gt;I think I'm very close, but my decoded string has a space between every character looking something like this:&lt;/P&gt;
&lt;P&gt;\ \ \ \ * \ \ b r a n c h \ \ s y s t e m \ \ t y p e 1 \ \ *&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2024 19:57:00 GMT</pubDate>
    <dc:creator>DaClyde</dc:creator>
    <dc:date>2024-11-13T19:57:00Z</dc:date>
    <item>
      <title>Possible to output a literal string with backslashes from a lookup without escaping?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704199#M238639</link>
      <description>&lt;P&gt;I am attempting to use a lookup to feed some UNC file paths into a dashboard search, but I am getting tripped by all the escaping of the backslashes and double quites in my string.&lt;/P&gt;&lt;P&gt;I want to call a field from a lookup with something like this as the actual value:&lt;/P&gt;&lt;P&gt;file_path="\\\\*\\branch\\system\\type1\\*" OR file_path="\\\\*\\branch\\system\\type2\\*"&lt;/P&gt;&lt;P&gt;I want to populate a field in my lookup table with actual key/value pairs and output the entire string based on a menu selection.&amp;nbsp; Unfortunately, if I try this, Splunk escapes all the double quotes and all the backslashes and it ends up looking like this in the litsearch, which is basically useless:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;file_path=\"\\\\\\\\*\\\\branch\\\\service\\\\type1\\\\*\" OR file_path=\"\\\\\\\\*\\\\branch\\\\service\\\\type2\\\\*\"&lt;BR /&gt;&lt;BR /&gt;How can I either properly escape the value within the lookup table so this doesn't happen, or is there any way to get Splunk to output the lookup value as a literal string and not try to interpret it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 17:05:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704199#M238639</guid>
      <dc:creator>DaClyde</dc:creator>
      <dc:date>2024-11-12T17:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to output a literal string with backslashes from a lookup without escaping?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704289#M238665</link>
      <description>&lt;P&gt;Try using tokens set to the ASCII hex value.&amp;nbsp; When written the token gets replaced by the single character.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 14:32:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704289#M238665</guid>
      <dc:creator>dural_yyz</dc:creator>
      <dc:date>2024-11-13T14:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to output a literal string with backslashes from a lookup without escaping?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704323#M238674</link>
      <description>&lt;P&gt;I did an inputlookup to get my field (uploads) and used this piece of search I found on another post:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| fields uploads
| rex field=uploads mode=sed "s/(\d+)/%\1/g"
| eval decode=urldecode(uploads)&lt;/LI-CODE&gt;
&lt;P&gt;I think I'm very close, but my decoded string has a space between every character looking something like this:&lt;/P&gt;
&lt;P&gt;\ \ \ \ * \ \ b r a n c h \ \ s y s t e m \ \ t y p e 1 \ \ *&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 19:57:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704323#M238674</guid>
      <dc:creator>DaClyde</dc:creator>
      <dc:date>2024-11-13T19:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to output a literal string with backslashes from a lookup without escaping?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704344#M238678</link>
      <description>&lt;P&gt;A second layer of sed script successfully strips the excess whitespace, but it doesn't look like I can include a double quote, even encoded, without Splunk escaping it in the value.&amp;nbsp; I was really hoping to chain several OR statements into a single lookup value, but I guess that isn't possible.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 20:45:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Possible-to-output-a-literal-string-with-backslashes-from-a/m-p/704344#M238678</guid>
      <dc:creator>DaClyde</dc:creator>
      <dc:date>2024-11-13T20:45:36Z</dc:date>
    </item>
  </channel>
</rss>

