<?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: Splunk search help -- output data should match 2 or more of the keywords in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351858#M165997</link>
    <description>&lt;P&gt;Heh.  We've encountered this kind of question before.  I'm starting to think it's a class assignment somewhere.  Here's one version...&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/56112/how-can-i-aggregate-some-values-of-a-field-and-divide-a-list-into-2-parts.html"&gt;https://answers.splunk.com/answers/56112/how-can-i-aggregate-some-values-of-a-field-and-divide-a-list-into-2-parts.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The basic form of the test required is like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?i)(?&amp;lt;matchword&amp;gt;firstword|secondword|thirdword|morewords)" max_match=0
| where mvcount(matchword)&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...and you can build the rex with code like this if your lookup table is going to be stable...&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/501920/how-to-create-a-custom-field-to-match-a-particular.html"&gt;https://answers.splunk.com/answers/501920/how-to-create-a-custom-field-to-match-a-particular.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;... ah, this may be the whole thing, or at last closely related...&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/555958/search-based-on-word-match.html"&gt;https://answers.splunk.com/answers/555958/search-based-on-word-match.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2017 21:44:24 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-09-20T21:44:24Z</dc:date>
    <item>
      <title>Splunk search help -- output data should match 2 or more of the keywords</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351856#M165995</link>
      <description>&lt;P&gt;Hi, Fellow Splunkers,&lt;/P&gt;

&lt;P&gt;Noob question. I would like to seek for help in my search, this is the case: The client gave csv for keywords, the search should be filtered based on the keyword matched, for example, the keywords are "Apple, Banana, Car" the output data should contain 2 or more of the keyword match. What will be my search? Is there an &lt;CODE&gt;if match.count &amp;gt; 1&lt;/CODE&gt; condition in splunk? &lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2017 11:41:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351856#M165995</guid>
      <dc:creator>dantimola</dc:creator>
      <dc:date>2017-09-20T11:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search help -- output data should match 2 or more of the keywords</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351857#M165996</link>
      <description>&lt;P&gt;can you please put an example of csv here ? and sample output of what you require?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2017 11:59:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351857#M165996</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2017-09-20T11:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search help -- output data should match 2 or more of the keywords</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351858#M165997</link>
      <description>&lt;P&gt;Heh.  We've encountered this kind of question before.  I'm starting to think it's a class assignment somewhere.  Here's one version...&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/56112/how-can-i-aggregate-some-values-of-a-field-and-divide-a-list-into-2-parts.html"&gt;https://answers.splunk.com/answers/56112/how-can-i-aggregate-some-values-of-a-field-and-divide-a-list-into-2-parts.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The basic form of the test required is like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?i)(?&amp;lt;matchword&amp;gt;firstword|secondword|thirdword|morewords)" max_match=0
| where mvcount(matchword)&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...and you can build the rex with code like this if your lookup table is going to be stable...&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/501920/how-to-create-a-custom-field-to-match-a-particular.html"&gt;https://answers.splunk.com/answers/501920/how-to-create-a-custom-field-to-match-a-particular.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;... ah, this may be the whole thing, or at last closely related...&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/555958/search-based-on-word-match.html"&gt;https://answers.splunk.com/answers/555958/search-based-on-word-match.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2017 21:44:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351858#M165997</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-20T21:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search help -- output data should match 2 or more of the keywords</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351859#M165998</link>
      <description>&lt;P&gt;Thank you very much! &lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 02:58:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351859#M165998</guid>
      <dc:creator>dantimola</dc:creator>
      <dc:date>2017-09-21T02:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search help -- output data should match 2 or more of the keywords</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351860#M165999</link>
      <description>&lt;P&gt;Hi I would like to seek for help once again, what about this case, the keyword needs to find is "Apple"&lt;BR /&gt;
the regex couldn't find the word Apple if it has a comma on its side unless I'll also add the comma in the keyword like &lt;CODE&gt;Apple, | Banana&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "(?i)(?&amp;lt;keyword_found&amp;gt;Apple| Banana......
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Apple,&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 03:04:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351860#M165999</guid>
      <dc:creator>dantimola</dc:creator>
      <dc:date>2017-09-22T03:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search help -- output data should match 2 or more of the keywords</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351861#M166000</link>
      <description>&lt;P&gt;@dantimola - unless you want to treat "Apple" and "Apple," as two different items, you should leave out the punctuation.  The regex will find Apple no matter what is around it... for example, CrabApple or ApplePieComputers would still lead to finding Apple.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 14:03:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-help-output-data-should-match-2-or-more-of-the/m-p/351861#M166000</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-25T14:03:13Z</dc:date>
    </item>
  </channel>
</rss>

