<?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 search correction with NOT in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66830#M16668</link>
    <description>&lt;P&gt;I have an alert setup. It is like&lt;/P&gt;

&lt;P&gt;"ABC-* NOT ("ABC-1" OR "ABC-2")&lt;/P&gt;

&lt;P&gt;"ABC-1", "ABC-2" being stuff I have taken care of.&lt;/P&gt;

&lt;P&gt;My result is like:&lt;/P&gt;

&lt;P&gt;ABC-&lt;BR /&gt;
ABC-3&lt;BR /&gt;
ABC-4&lt;BR /&gt;
ABC-5&lt;/P&gt;

&lt;P&gt;I want to remove that "ABC-". &lt;/P&gt;

&lt;P&gt;The problem is, if I add it as NOT to the search, I see no results. Like in&lt;/P&gt;

&lt;P&gt;"ABC-* NOT ("ABC-" OR "ABC-1" OR "ABC-2")&lt;/P&gt;

&lt;P&gt;I get 0 results. How to do that correctly?&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2013 18:14:44 GMT</pubDate>
    <dc:creator>aniketb</dc:creator>
    <dc:date>2013-09-18T18:14:44Z</dc:date>
    <item>
      <title>search correction with NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66830#M16668</link>
      <description>&lt;P&gt;I have an alert setup. It is like&lt;/P&gt;

&lt;P&gt;"ABC-* NOT ("ABC-1" OR "ABC-2")&lt;/P&gt;

&lt;P&gt;"ABC-1", "ABC-2" being stuff I have taken care of.&lt;/P&gt;

&lt;P&gt;My result is like:&lt;/P&gt;

&lt;P&gt;ABC-&lt;BR /&gt;
ABC-3&lt;BR /&gt;
ABC-4&lt;BR /&gt;
ABC-5&lt;/P&gt;

&lt;P&gt;I want to remove that "ABC-". &lt;/P&gt;

&lt;P&gt;The problem is, if I add it as NOT to the search, I see no results. Like in&lt;/P&gt;

&lt;P&gt;"ABC-* NOT ("ABC-" OR "ABC-1" OR "ABC-2")&lt;/P&gt;

&lt;P&gt;I get 0 results. How to do that correctly?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2013 18:14:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66830#M16668</guid>
      <dc:creator>aniketb</dc:creator>
      <dc:date>2013-09-18T18:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: search correction with NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66831#M16669</link>
      <description>&lt;P&gt;The ABC-* is very  generic.&lt;/P&gt;

&lt;P&gt;if you have a space after ABC-&lt;BR /&gt;
&lt;CODE&gt;"ABC-* NOT ("ABC-1" OR "ABC-2" OR "ABC- ")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;otherwise, you can add a second regex filter after to keep only ABC-&lt;DIGIT&gt;&lt;/DIGIT&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"ABC-* NOT ("ABC-1" OR "ABC-2") | regex _raw="ABC-\d"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2013 18:18:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66831#M16669</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-09-18T18:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: search correction with NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66832#M16670</link>
      <description>&lt;P&gt;I do pass this to a regex because this is an error code. Your regex doesn't gel well with mine. My complete search string is&lt;/P&gt;

&lt;P&gt;"ABC-&lt;EM&gt;" NOT ("ABC-1" OR "ABC-2") | rex "(?&lt;ERRORNAME&gt;ABC-[0-9]&lt;/ERRORNAME&gt;&lt;/EM&gt;)"  | stats count by ErrorName | sort-count&lt;/P&gt;

&lt;P&gt;Also there's no space after "ABC-"&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2013 18:40:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66832#M16670</guid>
      <dc:creator>aniketb</dc:creator>
      <dc:date>2013-09-18T18:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: search correction with NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66833#M16671</link>
      <description>&lt;P&gt;It works, the events with a non matching rex field "errorname" will have a null value for errorname, and should not appear in your stats by errorname.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2013 20:10:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66833#M16671</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-09-18T20:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: search correction with NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66834#M16672</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"abc-* NOT ("abc-1" OR "abc-2" OR TERM("abc-"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can read more about TERM &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Search/Usethesearchcommand"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2013 00:05:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66834#M16672</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-09-19T00:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: search correction with NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66835#M16673</link>
      <description>&lt;P&gt;Thanks for the new term... er tool.&lt;BR /&gt;
Why not just use &lt;BR /&gt;
regex _raw="ABC-\d" &lt;BR /&gt;
as the search and then NOT whateverelse?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2013 01:06:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66835#M16673</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-09-19T01:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: search correction with NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66836#M16674</link>
      <description>&lt;P&gt;You can't use &lt;CODE&gt;regex&lt;/CODE&gt; as the search, although you could run a search and then apply the &lt;CODE&gt;regex&lt;/CODE&gt; command to it as @yannK did...&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2013 05:50:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-correction-with-NOT/m-p/66836#M16674</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-09-20T05:50:20Z</dc:date>
    </item>
  </channel>
</rss>

