<?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 Help required on comparing two field values? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Help-required-on-comparing-two-field-values/m-p/480421#M7690</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;I got two field values:&lt;/P&gt;

&lt;P&gt;field1=xyz.com;&lt;BR /&gt;
field2=abc.xyz.com&lt;/P&gt;

&lt;P&gt;Now i want to compare these two values either with search command or where command where my expected results is, I dont want output because field1 which contains xyz.com; is present in field2 also.&lt;/P&gt;

&lt;P&gt;But If "field1=abc.com;" and "field2=xyz.com" where abc.com; is not equals to xyz.com then only I should get output. &lt;/P&gt;

&lt;P&gt;Note: Need to ignore semicolon (;) and comparison should be case insensitive.&lt;/P&gt;

&lt;P&gt;I tried with "where field1!=field2"  and  "field1=&lt;EM&gt;.field2.&lt;/EM&gt;" but not working&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Sat, 18 Apr 2020 16:24:03 GMT</pubDate>
    <dc:creator>Ankush_Kumar</dc:creator>
    <dc:date>2020-04-18T16:24:03Z</dc:date>
    <item>
      <title>Help required on comparing two field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Help-required-on-comparing-two-field-values/m-p/480421#M7690</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;I got two field values:&lt;/P&gt;

&lt;P&gt;field1=xyz.com;&lt;BR /&gt;
field2=abc.xyz.com&lt;/P&gt;

&lt;P&gt;Now i want to compare these two values either with search command or where command where my expected results is, I dont want output because field1 which contains xyz.com; is present in field2 also.&lt;/P&gt;

&lt;P&gt;But If "field1=abc.com;" and "field2=xyz.com" where abc.com; is not equals to xyz.com then only I should get output. &lt;/P&gt;

&lt;P&gt;Note: Need to ignore semicolon (;) and comparison should be case insensitive.&lt;/P&gt;

&lt;P&gt;I tried with "where field1!=field2"  and  "field1=&lt;EM&gt;.field2.&lt;/EM&gt;" but not working&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 16:24:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Help-required-on-comparing-two-field-values/m-p/480421#M7690</guid>
      <dc:creator>Ankush_Kumar</dc:creator>
      <dc:date>2020-04-18T16:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on comparing two field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Help-required-on-comparing-two-field-values/m-p/480422#M7691</link>
      <description>&lt;P&gt;use &lt;CODE&gt;trim()&lt;/CODE&gt;  and compare with &lt;CODE&gt;match()&lt;/CODE&gt; or &lt;CODE&gt;like()&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;reference:&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConditionalFunctions#match.28SUBJECT.2C_.22REGEX.22.29"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConditionalFunctions#match.28SUBJECT.2C_.22REGEX.22.29&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 21:42:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Help-required-on-comparing-two-field-values/m-p/480422#M7691</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-18T21:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on comparing two field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Help-required-on-comparing-two-field-values/m-p/480423#M7692</link>
      <description>&lt;P&gt;It'll be better if you extract interested values from field1 and field2 using &lt;CODE&gt;rex&lt;/CODE&gt; and then compare.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=field1 "(?&amp;lt;field1_domain&amp;gt;\w+.\w+)\W?$" 
| rex field=field2 "(?&amp;lt;field2_domain&amp;gt;\w+.\w+)\W?$" 
| where field1_domain != field2_domain
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval field1="abc.com;", field2="abc.xyz.com " 
| rex field=field1 "(?&amp;lt;field1_domain&amp;gt;\w+.\w+)\W?$" 
| rex field=field2 "(?&amp;lt;field2_domain&amp;gt;\w+.\w+)\W?$" 
| where field1_domain != field2_domain
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Apr 2020 11:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Help-required-on-comparing-two-field-values/m-p/480423#M7692</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-04-21T11:08:14Z</dc:date>
    </item>
  </channel>
</rss>

