<?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: compare fields for like match in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108104#M28132</link>
    <description>&lt;P&gt;I am trying to match a the values of a 1 field with the values of another field .&lt;/P&gt;

&lt;P&gt;When i use this eval I get &lt;CODE&gt;Error in 'eval' command: The arguments to the 'match' function are invalid.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;any ideas?&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2017 17:26:26 GMT</pubDate>
    <dc:creator>countermancs</dc:creator>
    <dc:date>2017-10-26T17:26:26Z</dc:date>
    <item>
      <title>compare fields for like match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108100#M28128</link>
      <description>&lt;P&gt;I am looking for methods to compare two fields for a like match.&lt;/P&gt;

&lt;P&gt;Specifically, I'd like to match when field1 can be found within field2.  Also, I would like the comparison to be support either case sensitive or insensitive options.  Fuzzy matching, including degree of similarity or confidence values, would also be helpful.&lt;/P&gt;

&lt;P&gt;For example, given two events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event1  field1="race"  field2="Racecar"
event2  field1="jump"  field2="Rope"
event3  field1="flip"  field2="BackFlip"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Desired result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  event1  result=hit
  event2  result=miss
  event3  result=hit
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance for your suggestions.&lt;/P&gt;

&lt;P&gt;-rg&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 15:23:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108100#M28128</guid>
      <dc:creator>rg33</dc:creator>
      <dc:date>2012-07-25T15:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields for like match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108101#M28129</link>
      <description>&lt;P&gt;Is this both question and answer?  If so, you should edit it so the answer appears in an answer response below.  That is more clear and you can get karma for a correct answer to your question and a "self-learner" badge for answering your own question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2012 01:31:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108101#M28129</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-07-27T01:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields for like match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108102#M28130</link>
      <description>&lt;P&gt;One solution:&lt;/P&gt;

&lt;P&gt;Case sensitive matching:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ... | eval results = if(match(field2,field1), "hit", "miss") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Case insensitive matching:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ... | eval results = if(match(upper(field2),upper(field1)), "hit", "miss") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I hope this helps others. I tried quite a few other ways before discovering this.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2012 13:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108102#M28130</guid>
      <dc:creator>rg33</dc:creator>
      <dc:date>2012-07-27T13:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields for like match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108103#M28131</link>
      <description>&lt;P&gt;looks like you have an extra ) or not enough ( in the case sensitive solution.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 20:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108103#M28131</guid>
      <dc:creator>dfqobvbkmnpi</dc:creator>
      <dc:date>2017-05-23T20:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields for like match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108104#M28132</link>
      <description>&lt;P&gt;I am trying to match a the values of a 1 field with the values of another field .&lt;/P&gt;

&lt;P&gt;When i use this eval I get &lt;CODE&gt;Error in 'eval' command: The arguments to the 'match' function are invalid.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 17:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108104#M28132</guid>
      <dc:creator>countermancs</dc:creator>
      <dc:date>2017-10-26T17:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields for like match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108105#M28133</link>
      <description>&lt;P&gt;I downvoted this post because error in 'eval' command: the arguments to the 'if' function are invalid.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 14:00:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108105#M28133</guid>
      <dc:creator>mad4wknds</dc:creator>
      <dc:date>2017-12-26T14:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields for like match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108106#M28134</link>
      <description>&lt;P&gt;I fixed the error.  Sorry for the typo.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 05:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108106#M28134</guid>
      <dc:creator>rg33</dc:creator>
      <dc:date>2018-03-25T05:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields for like match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108107#M28135</link>
      <description>&lt;P&gt;How would you get the time for which these two fields matched each other? Further, if it matches several times how would you get the first time they matched (earliest time)?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 14:30:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-fields-for-like-match/m-p/108107#M28135</guid>
      <dc:creator>xploresplunk</dc:creator>
      <dc:date>2019-06-18T14:30:16Z</dc:date>
    </item>
  </channel>
</rss>

