<?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 query with like() func ignoring case in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311680#M93388</link>
    <description>&lt;P&gt;Match is apparently what I needed and not like. Thanks!&lt;/P&gt;</description>
    <pubDate>Sun, 25 Feb 2018 14:01:21 GMT</pubDate>
    <dc:creator>zionsof</dc:creator>
    <dc:date>2018-02-25T14:01:21Z</dc:date>
    <item>
      <title>Search query with like() func ignoring case</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311678#M93386</link>
      <description>&lt;P&gt;Hey all, need some help to something I didn't manage and couldn't find any solution online.&lt;/P&gt;

&lt;P&gt;Assuming my data is of files and is indexed as JSON form as such:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;{...some stuff..., FileContent: &amp;lt;this-file-content&amp;gt; ...some stuff...}&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;And what I want to do is find all files that have a certain word.&lt;BR /&gt;
So, what I currently search is:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=main source=.... | where like(FileContent, "%someword%")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But, I want to to ignore all the case of someword (SoMeWord would be found as well).&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 08:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311678#M93386</guid>
      <dc:creator>zionsof</dc:creator>
      <dc:date>2018-02-25T08:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search query with like() func ignoring case</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311679#M93387</link>
      <description>&lt;P&gt;Use regular expressions if your actual matches are more complex: &lt;CODE&gt;... | regex FileContent="someword"&lt;/CODE&gt; or &lt;CODE&gt;... | where match(FileContent, "someword")&lt;/CODE&gt;&lt;BR /&gt;
If all you want is case-sensitive search, use &lt;CODE&gt;CASE()&lt;/CODE&gt;: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/Search/UseCASEandTERMtomatchphrases"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/Search/UseCASEandTERMtomatchphrases&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 13:07:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311679#M93387</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-02-25T13:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search query with like() func ignoring case</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311680#M93388</link>
      <description>&lt;P&gt;Match is apparently what I needed and not like. Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 14:01:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311680#M93388</guid>
      <dc:creator>zionsof</dc:creator>
      <dc:date>2018-02-25T14:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Search query with like() func ignoring case</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311681#M93389</link>
      <description>&lt;P&gt;Case sensitivity is a bit intricate with Splunk, but keep in mind that &lt;EM&gt;just&lt;/EM&gt; &lt;CODE&gt;FileContent = someword&lt;/CODE&gt; is case &lt;STRONG&gt;insensitive&lt;/STRONG&gt;. &lt;/P&gt;

&lt;P&gt;If you end up using &lt;CODE&gt;search&lt;/CODE&gt; or &lt;CODE&gt;where&lt;/CODE&gt; it gets interesting -&lt;/P&gt;

&lt;P&gt;The following would work assuming &lt;CODE&gt;someword&lt;/CODE&gt; as lower in the events -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    | search FileContent=someword  
    | search FileContent=Someword  
    | search FileContent="Someword" 
    | where  FileContent="someword" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And these won't -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    | where FileContent=someword 
    | where FileContent="Someword" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Meaning, the syntax of &lt;CODE&gt;search&lt;/CODE&gt; is equivalent to the regular search string while &lt;CODE&gt;where&lt;/CODE&gt; has regex syntax.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 20:41:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311681#M93389</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-02-25T20:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Search query with like() func ignoring case</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311682#M93390</link>
      <description>&lt;P&gt;That's not quite accurate, &lt;CODE&gt;where&lt;/CODE&gt; only uses regex when told to, e.g. when using &lt;CODE&gt;match()&lt;/CODE&gt;. The equals sign is just that, a case sensitive equals sign. &lt;CODE&gt;field=".*"&lt;/CODE&gt; won't be true unless &lt;CODE&gt;field&lt;/CODE&gt; literally contains a dot and an asterisk.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 21:58:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311682#M93390</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-02-25T21:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Search query with like() func ignoring case</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311683#M93391</link>
      <description>&lt;P&gt;Thank you @martin_mueller!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 22:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-with-like-func-ignoring-case/m-p/311683#M93391</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-02-25T22:01:40Z</dc:date>
    </item>
  </channel>
</rss>

