<?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 Negative substring matching against simple string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Negative-substring-matching-against-simple-string/m-p/248779#M189206</link>
    <description>&lt;P&gt;First, I am completely new to Splunk and the extent of my expertise with the query language is dumb wildcard matching and boolean combinations. I'm more than happy to learn more, but you're going to have to explain it assuming minimal knowledge. More than happy to rtfm, if someone could point me to the part of the manual I should be reading (all of it is not a good answer).&lt;/P&gt;

&lt;P&gt;So actual question:&lt;BR /&gt;
I want to exclude all events where one of the fields contains a substring of the following form: "string-one":"string-two", where string-one and string-two are particular strings of interest. So for example I'd like to match&lt;/P&gt;

&lt;P&gt;field: blah blah blah "foo":"bar"&lt;/P&gt;

&lt;P&gt;But not &lt;/P&gt;

&lt;P&gt;field: blah blah blah "string-one":"string-two"&lt;/P&gt;

&lt;P&gt;As an additional note, this is only one filter in a long list of conditions in the query&lt;BR /&gt;
I've tried a simple :&lt;BR /&gt;
&lt;CODE&gt;Field NOT ("*\string-one\":\"string-two\"*")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But it isn't working as I expect&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2016 17:20:09 GMT</pubDate>
    <dc:creator>nicklbailey</dc:creator>
    <dc:date>2016-03-15T17:20:09Z</dc:date>
    <item>
      <title>Negative substring matching against simple string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Negative-substring-matching-against-simple-string/m-p/248779#M189206</link>
      <description>&lt;P&gt;First, I am completely new to Splunk and the extent of my expertise with the query language is dumb wildcard matching and boolean combinations. I'm more than happy to learn more, but you're going to have to explain it assuming minimal knowledge. More than happy to rtfm, if someone could point me to the part of the manual I should be reading (all of it is not a good answer).&lt;/P&gt;

&lt;P&gt;So actual question:&lt;BR /&gt;
I want to exclude all events where one of the fields contains a substring of the following form: "string-one":"string-two", where string-one and string-two are particular strings of interest. So for example I'd like to match&lt;/P&gt;

&lt;P&gt;field: blah blah blah "foo":"bar"&lt;/P&gt;

&lt;P&gt;But not &lt;/P&gt;

&lt;P&gt;field: blah blah blah "string-one":"string-two"&lt;/P&gt;

&lt;P&gt;As an additional note, this is only one filter in a long list of conditions in the query&lt;BR /&gt;
I've tried a simple :&lt;BR /&gt;
&lt;CODE&gt;Field NOT ("*\string-one\":\"string-two\"*")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But it isn't working as I expect&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 17:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Negative-substring-matching-against-simple-string/m-p/248779#M189206</guid>
      <dc:creator>nicklbailey</dc:creator>
      <dc:date>2016-03-15T17:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Negative substring matching against simple string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Negative-substring-matching-against-simple-string/m-p/248780#M189207</link>
      <description>&lt;P&gt;There's an extra escape character in your search string.   Try &lt;CODE&gt;Field NOT ("*string-one\":\"string-two\"*")&lt;/CODE&gt; or &lt;CODE&gt;Field NOT ('*string-one":"string-two"*')&lt;/CODE&gt;.  If those fail, try &lt;CODE&gt;... | where NOT like(field, '%string-one":"string-two"%') | ...&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 18:03:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Negative-substring-matching-against-simple-string/m-p/248780#M189207</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-03-15T18:03:35Z</dc:date>
    </item>
  </channel>
</rss>

