<?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: Search for a field not containing a specific pattern. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/604233#M210175</link>
    <description>&lt;P&gt;What to refer if on whole payload without any fields ?&lt;/P&gt;</description>
    <pubDate>Sat, 02 Jul 2022 09:45:42 GMT</pubDate>
    <dc:creator>Nayra_bakshi</dc:creator>
    <dc:date>2022-07-02T09:45:42Z</dc:date>
    <item>
      <title>Search for a field not containing a specific pattern.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166354#M47378</link>
      <description>&lt;P&gt;I have two indexed fields, FieldX and FieldY. I want to search for all instances of FieldX that contain 'ABC' where FieldY does not contain '123'. I assume the format would start something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FieldX=ABC AND FieldY
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I don't know how to finish that. Would someone please help me out?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 20:34:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166354#M47378</guid>
      <dc:creator>tdismukes</dc:creator>
      <dc:date>2014-07-31T20:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a field not containing a specific pattern.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166355#M47379</link>
      <description>&lt;P&gt;How about:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your_SourceType (FieldX=ABC AND FieldY!=123)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Jul 2014 20:37:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166355#M47379</guid>
      <dc:creator>Jeff_Lightly_Sp</dc:creator>
      <dc:date>2014-07-31T20:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a field not containing a specific pattern.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166356#M47380</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FieldX="*ABC*" NOT FieldY="*123*"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Jul 2014 20:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166356#M47380</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-31T20:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a field not containing a specific pattern.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166357#M47381</link>
      <description>&lt;P&gt;Didn't see (or at least comprehend) the words 'contain'. That certainly could matter!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 20:50:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166357#M47381</guid>
      <dc:creator>Jeff_Lightly_Sp</dc:creator>
      <dc:date>2014-07-31T20:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a field not containing a specific pattern.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166358#M47382</link>
      <description>&lt;P&gt;That was exactly what I needed, thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 20:51:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/166358#M47382</guid>
      <dc:creator>tdismukes</dc:creator>
      <dc:date>2014-07-31T20:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a field not containing a specific pattern.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/604232#M210174</link>
      <description>&lt;P&gt;what to refer to if want to search on the whole payload/Raw logs, not in a particular field?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jul 2022 09:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/604232#M210174</guid>
      <dc:creator>Nayra_bakshi</dc:creator>
      <dc:date>2022-07-02T09:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a field not containing a specific pattern.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/604233#M210175</link>
      <description>&lt;P&gt;What to refer if on whole payload without any fields ?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jul 2022 09:45:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/604233#M210175</guid>
      <dc:creator>Nayra_bakshi</dc:creator>
      <dc:date>2022-07-02T09:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a field not containing a specific pattern.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/604235#M210176</link>
      <description>&lt;P&gt;Firstly, let me point out that you're trying to resurrect an 8 year old thread. Next time, start a new one with your question - you'll get better chance of reply.&lt;/P&gt;&lt;P&gt;Back to your question - if you want to find all events which don't contain the string "abc" _anywhere_ within the raw event, simply search for&lt;/P&gt;&lt;PRE&gt;NOT *abc*&lt;/PRE&gt;&lt;P&gt;Having said that - it's not the best way to search. If you search for something containing wildcard at the beginning of the search term (either as a straight search or a negative search like in our case) splunk has to scan all raw events to verify whether the event matches. It cannot use internal indexes of words to find only a subset of events which matches the condition.&lt;/P&gt;&lt;P&gt;Therefore you should, whenever possible, search for fixed strings.&lt;/P&gt;&lt;P&gt;And remember that while indexing events splunk splits them into words on whitespaces and punctuators. So "abc" will match both "abc def" as well as "whatever.abc.ding-dong".&lt;/P&gt;&lt;P&gt;Wildcards are often overused in splunk search and they might incur huge performance penalty.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jul 2022 10:54:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-a-field-not-containing-a-specific-pattern/m-p/604235#M210176</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-07-02T10:54:00Z</dc:date>
    </item>
  </channel>
</rss>

