<?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: How to add an escape \ to a value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206587#M60158</link>
    <description>&lt;P&gt;This is what ended up working:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... |rex field=blah "(?&amp;lt;domain&amp;gt;.*)\\\(?&amp;lt;username&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 13 Jun 2016 17:41:43 GMT</pubDate>
    <dc:creator>ccsfdave</dc:creator>
    <dc:date>2016-06-13T17:41:43Z</dc:date>
    <item>
      <title>How to add an escape \ to a value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206584#M60155</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;I am using a form and the dynamic inputs is a table of usernames.  The search results in &lt;CODE&gt;Domain\username&lt;/CODE&gt;. I would like to use the results as a token in the next panel, but in order to do that I need it to be in the form of &lt;CODE&gt;"Domain\\username"&lt;/CODE&gt;.  Does anyone have a pointer on how I may accomplish this?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2016 15:03:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206584#M60155</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-10T15:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an escape \ to a value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206585#M60156</link>
      <description>&lt;P&gt;I'm not sure if this is the cleanest way to do this but it works. In the dynamic input field add a rex statement to your search parse out Domain and username into two fields and then concatenate them back together with an extra .&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;|rex field=usernames ""(?[^\]+)\(?.*)"&lt;/LI&gt;
&lt;LI&gt;|eval username = domain . "\\" . user&lt;/LI&gt;
&lt;LI&gt;|stats count by username&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;This will give you values of the username field with the additional backslash for your escape character.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2016 23:41:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206585#M60156</guid>
      <dc:creator>cmccririe</dc:creator>
      <dc:date>2016-06-10T23:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an escape \ to a value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206586#M60157</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=username mode=sed "s/\\\/\\\\\\\/"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Jun 2016 17:38:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206586#M60157</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-13T17:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an escape \ to a value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206587#M60158</link>
      <description>&lt;P&gt;This is what ended up working:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... |rex field=blah "(?&amp;lt;domain&amp;gt;.*)\\\(?&amp;lt;username&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Jun 2016 17:41:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-escape-to-a-value/m-p/206587#M60158</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-13T17:41:43Z</dc:date>
    </item>
  </channel>
</rss>

