<?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: Multiple Key Value Pair Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146057#M40765</link>
    <description>&lt;P&gt;I changed it a bit so that it also includes the last key/value pair (?&amp;lt;&lt;EM&gt;KEY_1&amp;gt;[A-Z&lt;/EM&gt;]+): (?&amp;lt;&lt;EM&gt;VAL_1&amp;gt;.*?)(?=(\s[A-Z&lt;/EM&gt;]+:)|$)&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:31:26 GMT</pubDate>
    <dc:creator>FRoth</dc:creator>
    <dc:date>2020-09-28T16:31:26Z</dc:date>
    <item>
      <title>Multiple Key Value Pair Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146052#M40760</link>
      <description>&lt;P&gt;I have a log format that contains KEY/VALUE pairs in this format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Feb 10 12:02:38 192.168.56.101 Feb 10 12:02:37 PROMETHEUS/192.168.56.101 THOR: Info: MODULE: UserAccounts MESSAGE: User Account USER: trinity FULL_NAME: trinity PRIV: 1 LAST_LOGON: 03/02/2014 13:52:38 BADPWCOUNT: 0 LOGON_SERVER: \\* NUM_LOGONS: 8 PASS_AGE: 78.00  days
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The thing is, that the values are terminated by the next key, so the extraction would be: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;_KEY_1&amp;gt;[A-Z_]+): (?&amp;lt;_VAL_1&amp;gt;.*?) [A-Z_]+:
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem I face is that it only extracts the first, third, fifth, seventh ... key/value pair as it skips the following key as part of the first extraction. &lt;BR /&gt;
Is there a way to handle this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:03:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146052#M40760</guid>
      <dc:creator>FRoth</dc:creator>
      <dc:date>2014-04-29T15:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Key Value Pair Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146053#M40761</link>
      <description>&lt;P&gt;Are the keys always the same and in the same order?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146053#M40761</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-29T15:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Key Value Pair Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146054#M40762</link>
      <description>&lt;P&gt;No. There are more than 40 different formats. I use to extract them separately by specific extraction rules and would like to extract all by a single rule. i.e. what I normally do is "DOMAIN: (?&lt;DOMAIN&gt;.*?) [A-Z_]+:".&lt;/DOMAIN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:33:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146054#M40762</guid>
      <dc:creator>FRoth</dc:creator>
      <dc:date>2014-04-29T15:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Key Value Pair Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146055#M40763</link>
      <description>&lt;P&gt;According to RegExr, this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;_KEY_1&amp;gt;[A-Z_]+): (?&amp;lt;_VAL_1&amp;gt;.*?) (?=[A-Z_]+:)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It matches the next key without including it in the result.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146055#M40763</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-29T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Key Value Pair Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146056#M40764</link>
      <description>&lt;P&gt;Awesome. This works. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146056#M40764</guid>
      <dc:creator>FRoth</dc:creator>
      <dc:date>2014-04-29T15:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Key Value Pair Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146057#M40765</link>
      <description>&lt;P&gt;I changed it a bit so that it also includes the last key/value pair (?&amp;lt;&lt;EM&gt;KEY_1&amp;gt;[A-Z&lt;/EM&gt;]+): (?&amp;lt;&lt;EM&gt;VAL_1&amp;gt;.*?)(?=(\s[A-Z&lt;/EM&gt;]+:)|$)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Key-Value-Pair-Extraction/m-p/146057#M40765</guid>
      <dc:creator>FRoth</dc:creator>
      <dc:date>2020-09-28T16:31:26Z</dc:date>
    </item>
  </channel>
</rss>

