<?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: [SIDEVIEW UTILS] escaping quote in postProcess module in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28852#M987</link>
    <description>&lt;P&gt;Thanks for the insight. I was able to solve the problem. In fact it has nothing to do with the space or not (it just appears to reveal the problem). It was due to the fact that I need to double escape the quote in some case. Details in the answer below.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Feb 2013 17:12:49 GMT</pubDate>
    <dc:creator>guilhem</dc:creator>
    <dc:date>2013-02-14T17:12:49Z</dc:date>
    <item>
      <title>[SIDEVIEW UTILS] escaping quote in postProcess module</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28847#M982</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;

&lt;P&gt;I have run into some problem trying to escape quote into the postProcess module. When I do this:&lt;/P&gt;

&lt;P&gt;| eval s=case("$sRange$"=="all", "segment= \"All\"", "$sRange$"=="custom", "$ss$", 1==1, "( s=$sRange$)")&lt;/P&gt;

&lt;P&gt;and $sRange$="all", it looks like $s$ is empty, but when I do (notice the space between \"All\" and the quote before the coma):&lt;/P&gt;

&lt;P&gt;| eval s=case("$sRange$"=="all", "segment= \"All\" ", "$sRange$"=="custom", "$ss$", 1==1, "( s=$sRange$)")&lt;/P&gt;

&lt;P&gt;and $sRange$="all", it looks like $s$="segment=\"All\"", which is what I would expect using the first eval. I don't know if it's intended or if there is a better way to do this?&lt;/P&gt;

&lt;P&gt;Guilhem&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 16:32:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28847#M982</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2013-02-12T16:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: [SIDEVIEW UTILS] escaping quote in postProcess module</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28848#M983</link>
      <description>&lt;P&gt;I think the answer is just to use \"   to escape the internal double-quote characters in your search.   EG: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| eval s=case("$sRange$"=="all", "segment=\"All\"", "$sRange$"=="custom", "$ss$", 1==1, "( s=$sRange$)")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Indeed the way it was,  it was probably throwing a language parsing error,  but either way it definitely wasn't going to figure out that the internal double quotes were part of your string. &lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 16:38:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28848#M983</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-12T16:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: [SIDEVIEW UTILS] escaping quote in postProcess module</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28849#M984</link>
      <description>&lt;P&gt;Sorry -_-, I forgot to escape the backslashes ^^, so the page just show normal quotes.&lt;/P&gt;

&lt;P&gt;I edit it.&lt;/P&gt;

&lt;P&gt;The answer you have given is what I would expect too (putting a space or not between the \" and the " shouldn't matter, but somehow it does, at least  in splunk 4.2 with sideview 2.2.8).&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 16:44:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28849#M984</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2013-02-12T16:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: [SIDEVIEW UTILS] escaping quote in postProcess module</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28850#M985</link>
      <description>&lt;P&gt;OK.  I'll definitely take a look.  Can you post your XML either on your question or in pastebin?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 19:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28850#M985</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-12T19:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: [SIDEVIEW UTILS] escaping quote in postProcess module</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28851#M986</link>
      <description>&lt;P&gt;If you're trying to insert the value of a $foo$ token into a postProcess string, that value has double-quotes, and you're inserting it into a location where that value will need to have those double quotes escaped,   then you might want to look at the 'escapeQuotes' param of the ValueSetter module which can create an appropriately escaped version for you.    However because this is quite an unusual question I think there's probably some elephant-in-the-room issue where we can get you sorted at a higher level.  Please add more details. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2013 06:39:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28851#M986</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-14T06:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: [SIDEVIEW UTILS] escaping quote in postProcess module</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28852#M987</link>
      <description>&lt;P&gt;Thanks for the insight. I was able to solve the problem. In fact it has nothing to do with the space or not (it just appears to reveal the problem). It was due to the fact that I need to double escape the quote in some case. Details in the answer below.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2013 17:12:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28852#M987</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2013-02-14T17:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: [SIDEVIEW UTILS] escaping quote in postProcess module</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28853#M988</link>
      <description>&lt;P&gt;In fact, after experimentation, I was using the $s$ token inside another $value$ token inside a string, and I was using $s$ elsewhere directly, not in a string.&lt;/P&gt;

&lt;P&gt;So basically I needed two version of this token:&lt;/P&gt;

&lt;P&gt;| eval s=case("$sRange$"=="all", "segment=\"All\"", "$sRange$"=="custom", "$ss$", 1==1, "( s=$sRange$)")&lt;/P&gt;

&lt;P&gt;This basic version, to be used directly inside a query, and this escaped version&lt;/P&gt;

&lt;P&gt;| eval s_escaped=case("$sRange$"=="all", "segment=\\\"All\\\"", "$sRange$"=="custom", "$ss$", 1==1, "( s=$sRange$)")&lt;/P&gt;

&lt;P&gt;To be used inside a $value$ token that was itself contained inside a string (" do some stuff on $value$ ")&lt;/P&gt;

&lt;P&gt;Not sure if it's clear but I was confused in the first place because of the different way I used the $s$ token (either inside or outside a string)&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2013 17:18:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SIDEVIEW-UTILS-escaping-quote-in-postProcess-module/m-p/28853#M988</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2013-02-14T17:18:19Z</dc:date>
    </item>
  </channel>
</rss>

