<?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: can i use &amp;quot;like&amp;quot; in search criteria in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89790#M182250</link>
    <description>&lt;P&gt;whats the best way to compare with a list of items.&lt;BR /&gt;
I am looking for something like this:&lt;BR /&gt;
|search where  NotificationEventType in ("THE_CHEESEBURGER%", "THE_HAMBURGER%", "ETC%"...)&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 23:16:13 GMT</pubDate>
    <dc:creator>pranjal</dc:creator>
    <dc:date>2020-09-29T23:16:13Z</dc:date>
    <item>
      <title>can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89781#M182241</link>
      <description>&lt;P&gt;if one of my fields is host, I want to do&lt;/P&gt;

&lt;P&gt;host like "startswith*"&lt;/P&gt;

&lt;P&gt;what is the syntax to do that? thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 17:34:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89781#M182241</guid>
      <dc:creator>alexl1</dc:creator>
      <dc:date>2013-07-09T17:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89782#M182242</link>
      <description>&lt;P&gt;Here are are a couple ways.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;&lt;CODE&gt;host=foo*&lt;/CODE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;&lt;CODE&gt;... | where like(host, "foo%")&lt;/CODE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 09 Jul 2013 17:42:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89782#M182242</guid>
      <dc:creator>JSapienza</dc:creator>
      <dc:date>2013-07-09T17:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89783#M182243</link>
      <description>&lt;P&gt;thanks!  ...&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 17:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89783#M182243</guid>
      <dc:creator>alexl1</dc:creator>
      <dc:date>2013-07-09T17:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89784#M182244</link>
      <description>&lt;P&gt;What is the best way to exclude event that start with foo*?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jul 2016 12:14:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89784#M182244</guid>
      <dc:creator>bcherdak</dc:creator>
      <dc:date>2016-07-03T12:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89785#M182245</link>
      <description>&lt;P&gt;-- bcherdak, you asked - "What is the best way to exclude event that start with foo*?"&lt;/P&gt;

&lt;P&gt;I would say - &lt;CODE&gt;... NOT host = "foo*"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jul 2016 20:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89785#M182245</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-07-03T20:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89786#M182246</link>
      <description>&lt;P&gt;While it's probably safe to use &lt;CODE&gt;NOT host="foo*"&lt;/CODE&gt; since the host field should always exist, I'd favor the &lt;CODE&gt;host!="foo*"&lt;/CODE&gt; syntax; if you have a pattern you're matching on, you probably expect that field to exist in the results. Using the NOT approach will also return events that are missing the field which is probably not what most people want.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2016 03:48:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89786#M182246</guid>
      <dc:creator>jtacy</dc:creator>
      <dc:date>2016-07-04T03:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89787#M182247</link>
      <description>&lt;P&gt;If you want to exclude events where a field doesn't start with foo*, use &lt;CODE&gt;field!="foo*"&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If you want to exclude events where the event itself doesn't start with foo*, you can use &lt;CODE&gt;_raw!="foo*"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:08:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89787#M182247</guid>
      <dc:creator>jtacy</dc:creator>
      <dc:date>2020-09-29T10:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89788#M182248</link>
      <description>&lt;P&gt;@bcherdak :  What is the best way to exclude event that start with foo*?&lt;/P&gt;

&lt;P&gt;your search | where NOT like(host,"foo%")&lt;/P&gt;

&lt;P&gt;This should do the magic.&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 16:24:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89788#M182248</guid>
      <dc:creator>th1agarajan</dc:creator>
      <dc:date>2018-05-03T16:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89789#M182249</link>
      <description>&lt;P&gt;whats the best way to compare with a list of items.&lt;BR /&gt;
I am looking for something like this:&lt;BR /&gt;
|search where  NotificationEventType in ("THE_CHEESEBURGER%", "THE_HAMBURGER%", "ETC%"...)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:16:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89789#M182249</guid>
      <dc:creator>pranjal</dc:creator>
      <dc:date>2020-09-29T23:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: can i use "like" in search criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89790#M182250</link>
      <description>&lt;P&gt;whats the best way to compare with a list of items.&lt;BR /&gt;
I am looking for something like this:&lt;BR /&gt;
|search where  NotificationEventType in ("THE_CHEESEBURGER%", "THE_HAMBURGER%", "ETC%"...)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:16:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-use-quot-like-quot-in-search-criteria/m-p/89790#M182250</guid>
      <dc:creator>pranjal</dc:creator>
      <dc:date>2020-09-29T23:16:13Z</dc:date>
    </item>
  </channel>
</rss>

