<?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: match function is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477092#M192664</link>
    <description>&lt;P&gt;@Allampally ,&lt;BR /&gt;
Try comparing it against the literal string. Probably a space or special characters might be the reason.&lt;/P&gt;

&lt;P&gt;For .e.g try field1="xyz" and field2="xyz" separately and see if you are getting the expected result.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Apr 2020 05:07:03 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2020-04-17T05:07:03Z</dc:date>
    <item>
      <title>match function is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477091#M192663</link>
      <description>&lt;P&gt;I have two fields called field1, field2. Both are having same value as "xyz" but when i try to compare them with match function, it is saying that both values are different. Output of below query is "No" but I am expecting the answer "Yes" as both are equal. &lt;BR /&gt;
eval results1=if(field1=field2,"Yes","No") &lt;BR /&gt;
If any field format make differ here ?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 04:34:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477091#M192663</guid>
      <dc:creator>Allampally</dc:creator>
      <dc:date>2020-04-17T04:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: match function is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477092#M192664</link>
      <description>&lt;P&gt;@Allampally ,&lt;BR /&gt;
Try comparing it against the literal string. Probably a space or special characters might be the reason.&lt;/P&gt;

&lt;P&gt;For .e.g try field1="xyz" and field2="xyz" separately and see if you are getting the expected result.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 05:07:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477092#M192664</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-04-17T05:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: match function is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477093#M192665</link>
      <description>&lt;P&gt;That way, it is working but i have extracted one field using rex. Not sure that is causing any difference. &lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 06:15:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477093#M192665</guid>
      <dc:creator>Allampally</dc:creator>
      <dc:date>2020-04-17T06:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: match function is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477094#M192666</link>
      <description>&lt;P&gt;hi @Allampally &lt;/P&gt;

&lt;P&gt;try below -- &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval results1=if(match(field1,field2),"Yes","No")

|eval results1=if(like(field1,field2),"Yes","No")

|eval results1=if(field1==field2,"Yes","No")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you not get results using this.check your fields contains any spaces.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval field1=upper(trim(fied1)),field2=trim(upper(field2))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Apr 2020 06:27:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/match-function-is-not-working/m-p/477094#M192666</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2020-04-17T06:27:09Z</dc:date>
    </item>
  </channel>
</rss>

