<?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: How do I reference other fields in a Splunk regex search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202292#M58678</link>
    <description>&lt;P&gt;worked perfectly, thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 02 Nov 2016 03:16:17 GMT</pubDate>
    <dc:creator>jonbelanger</dc:creator>
    <dc:date>2016-11-02T03:16:17Z</dc:date>
    <item>
      <title>How do I reference other fields in a Splunk regex search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202289#M58675</link>
      <description>&lt;P&gt;Would like to do this:&lt;/P&gt;

&lt;P&gt;Where indexa has two fields, md5 and allmd5&lt;/P&gt;

&lt;P&gt;Two records exist like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;md5=99ed710da1d10b1cf8c4fb7c2549a9dc
allmd5={"MD5":"99ed710da1d10b1cf8c4fb7c2549a9dc". MD5:"6ac349a75ff9e7cbc92cd68c5fc44eed", "MD5":"8ca9e5e0a7cdb058f6f33f60a2fde2ef"}

md5=45c4a725006767124e21242670e7795f 
allmd5={"MD5":"99ed710da1d10b1cf8c4fb7c2549a9dc". MD5:"6ac349a75ff9e7cbc92cd68c5fc44eed", "MD5":"8ca9e5e0a7cdb058f6f33f60a2fde2ef"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=indexa | regex allmd5!=md5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=indexa | regex allmd5!="\"".md5."\""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Tried it with &lt;CODE&gt;eval&lt;/CODE&gt; too&lt;/P&gt;

&lt;P&gt;but it always returns all records where it should just return the case where the value of md5 for that record is NOT in the allmd5 value.&lt;/P&gt;

&lt;P&gt;What am I missing?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2016 22:01:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202289#M58675</guid>
      <dc:creator>jonbelanger</dc:creator>
      <dc:date>2016-11-01T22:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reference other fields in a Splunk regex search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202290#M58676</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval data="md5=99ed710da1d10b1cf8c4fb7c2549a9dc#allmd5={\"MD5\":\"99ed710da1d10b1cf8c4fb7c2549a9dc\". MD5:\"6ac349a75ff9e7cbc92cd68c5fc44eed\", \"MD5\":\"8ca9e5e0a7cdb058f6f33f60a2fde2ef\"}%md5=45c4a725006767124e21242670e7795f#allmd5={\"MD5\":\"99ed710da1d10b1cf8c4fb7c2549a9dc\". MD5:\"6ac349a75ff9e7cbc92cd68c5fc44eed\", \"MD5\":\"8ca9e5e0a7cdb058f6f33f60a2fde2ef\"}\"" | rex max_match=0 field=data "(?&amp;lt;line&amp;gt;[^%]+)" | mvexpand line |  rex  field=line "md5=(?&amp;lt;md5&amp;gt;[^#]+)#allmd5=(?&amp;lt;allmd5&amp;gt;[^#]+)" | table md5 allmd5 | where NOT match(allmd5, md5)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Nov 2016 22:55:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202290#M58676</guid>
      <dc:creator>bshuler_splunk</dc:creator>
      <dc:date>2016-11-01T22:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reference other fields in a Splunk regex search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202291#M58677</link>
      <description>&lt;P&gt;Can you try this simply:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yourBaseSearch to return md5 and allmd5
| eval matched=if(match(allmd5, md5), 1, 0)
| table md5, allmd5, matched
| where matched=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Nov 2016 23:56:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202291#M58677</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-01T23:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reference other fields in a Splunk regex search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202292#M58678</link>
      <description>&lt;P&gt;worked perfectly, thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 03:16:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-reference-other-fields-in-a-Splunk-regex-search/m-p/202292#M58678</guid>
      <dc:creator>jonbelanger</dc:creator>
      <dc:date>2016-11-02T03:16:17Z</dc:date>
    </item>
  </channel>
</rss>

