<?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 Matching A vs AAAA rex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107904#M28072</link>
    <description>&lt;P&gt;All,&lt;/P&gt;

&lt;P&gt;I'm stuck on a regex issue.  Not sure how I can match A records vs AAAA records within windows dns logs.  I came up with the following:&lt;/P&gt;

&lt;P&gt;sourcetype=windns* | rex "NOERROR]\s(?&lt;RECORD_TYPE&gt;(?:A|PTR|SRV|TXT|AAAA))\s" | table record_type&lt;/RECORD_TYPE&gt;&lt;/P&gt;

&lt;P&gt;However, my AAAA records don't return, I'm thinking this is because the A is matched and the match stops there.  How would one match A and AAAA records? &lt;/P&gt;

&lt;P&gt;Here is a sample data set:&lt;/P&gt;

&lt;P&gt;20131021 12:24:06 1190 PACKET  05D2B130 UDP Rcv 192.168.x.x   e31f   Q [0001   D   NOERROR] A      test.example.com&lt;BR /&gt;
20131021 12:24:06 1190 PACKET  1D4EE140 UDP Rcv 192.168.x.x   3d6d   Q [0001   D   NOERROR] AAAA   test.example.com&lt;/P&gt;

&lt;P&gt;Any pointers or assistance would be helpful.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2013 16:59:10 GMT</pubDate>
    <dc:creator>dondky</dc:creator>
    <dc:date>2013-10-21T16:59:10Z</dc:date>
    <item>
      <title>Matching A vs AAAA rex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107904#M28072</link>
      <description>&lt;P&gt;All,&lt;/P&gt;

&lt;P&gt;I'm stuck on a regex issue.  Not sure how I can match A records vs AAAA records within windows dns logs.  I came up with the following:&lt;/P&gt;

&lt;P&gt;sourcetype=windns* | rex "NOERROR]\s(?&lt;RECORD_TYPE&gt;(?:A|PTR|SRV|TXT|AAAA))\s" | table record_type&lt;/RECORD_TYPE&gt;&lt;/P&gt;

&lt;P&gt;However, my AAAA records don't return, I'm thinking this is because the A is matched and the match stops there.  How would one match A and AAAA records? &lt;/P&gt;

&lt;P&gt;Here is a sample data set:&lt;/P&gt;

&lt;P&gt;20131021 12:24:06 1190 PACKET  05D2B130 UDP Rcv 192.168.x.x   e31f   Q [0001   D   NOERROR] A      test.example.com&lt;BR /&gt;
20131021 12:24:06 1190 PACKET  1D4EE140 UDP Rcv 192.168.x.x   3d6d   Q [0001   D   NOERROR] AAAA   test.example.com&lt;/P&gt;

&lt;P&gt;Any pointers or assistance would be helpful.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 16:59:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107904#M28072</guid>
      <dc:creator>dondky</dc:creator>
      <dc:date>2013-10-21T16:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Matching A vs AAAA rex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107905#M28073</link>
      <description>&lt;P&gt;Why be so specific?  Just take everything between "NOERROR]" and the DNS name as the record type.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "NOERROR]\s(?&amp;lt;record_type&amp;gt;.*?)\s" |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you only want to see specific record types, use a where clause after the rex.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 17:07:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107905#M28073</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2013-10-21T17:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Matching A vs AAAA rex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107906#M28074</link>
      <description>&lt;P&gt;Might be answering my own question but I think I found a solution with the following:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=windns* | rex "NOERROR]\s(?&amp;lt;record_type&amp;gt;(?:A|PTR|SRV|TXT|\bAAAA\b))\s" | table record_type&lt;/CODE&gt;.  Still open to how others would solve this though. &lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 17:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107906#M28074</guid>
      <dc:creator>dondky</dc:creator>
      <dc:date>2013-10-21T17:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Matching A vs AAAA rex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107907#M28075</link>
      <description>&lt;P&gt;Wow, this is much better I tried .* route but never added the ? hence I went the specific route.  Thanks for pointing this out.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 17:16:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107907#M28075</guid>
      <dc:creator>dondky</dc:creator>
      <dc:date>2013-10-21T17:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Matching A vs AAAA rex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107908#M28076</link>
      <description>&lt;P&gt;Please accept this answer if it solves your problem.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 17:24:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-A-vs-AAAA-rex-help/m-p/107908#M28076</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2013-10-21T17:24:31Z</dc:date>
    </item>
  </channel>
</rss>

