<?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: Key value pair extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction/m-p/315412#M94419</link>
    <description>&lt;P&gt;try below&lt;/P&gt;

&lt;P&gt;your base search |  rex field=test max_match=100  "Key:\s\'(?P&amp;lt;key&amp;gt;\w+)\'\s+Value:\s+\'(?P&amp;lt;Value&amp;gt;\S+)\'" | table test key Value&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2017 14:07:02 GMT</pubDate>
    <dc:creator>sbbadri</dc:creator>
    <dc:date>2017-07-18T14:07:02Z</dc:date>
    <item>
      <title>Key value pair extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction/m-p/315411#M94418</link>
      <description>&lt;P&gt;My Sample data is below:&lt;/P&gt;

&lt;P&gt;2017-07-17 23:59:43,156 ERROR------------webserver logs from servers------------ Attributes Key: 'Date' Value: 'Mon Jul 17 23:56:36 EDT 2017' Key: 'Size' Value: '597' Key: 'Attribute' Value: 'unmatched' Key: 'Content' Value: 'http' Key: 'timestamp' Value: '1500350196677' Key: 'origin' Value: 'TEST' Key: 'event_timestamp' Value: '2017-52-78 14:17:39.364' Key: 'file' Value: '1083753866763157' Key: 'tokenid' Value: '0e85b547' Key: 'offset' Value: '112' Key: 'partition' Value: '2' Key: 'topic' Value: 'DEV12345' Key: 'path' Value: './' Key: 'idms' Value: '8339e9de-a743-4534-b346-d5a06ea39b21' ------------&lt;/P&gt;

&lt;P&gt;Here I want &lt;BR /&gt;
Date= Mon Jul 17 23:56:36 EDT 2017&lt;BR /&gt;
size = 597&lt;BR /&gt;
Attribute = unmatched&lt;BR /&gt;
Content = http&lt;BR /&gt;
.. etc&lt;/P&gt;

&lt;P&gt;|  rex ".*Key:\s\'(?P[^']+)\'\sValue:\s\'(?P[^']+)\'\s+"&lt;/P&gt;

&lt;P&gt;tried the extraction but here myKey1 , myValue nothing is extracted.&lt;BR /&gt;
Also tried some extract command for pairdelim and kvdelim attributes.. no luck.&lt;BR /&gt;
Any help here will be most helpful.&lt;/P&gt;

&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:38:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction/m-p/315411#M94418</guid>
      <dc:creator>SrinivasaC</dc:creator>
      <dc:date>2017-07-18T13:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Key value pair extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction/m-p/315412#M94419</link>
      <description>&lt;P&gt;try below&lt;/P&gt;

&lt;P&gt;your base search |  rex field=test max_match=100  "Key:\s\'(?P&amp;lt;key&amp;gt;\w+)\'\s+Value:\s+\'(?P&amp;lt;Value&amp;gt;\S+)\'" | table test key Value&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:07:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction/m-p/315412#M94419</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-07-18T14:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Key value pair extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction/m-p/315413#M94420</link>
      <description>&lt;P&gt;Its not giving me exact results.. Its showing result as Values(key1) and values(value1) result. These fields are not showing in interested fields. Thanks for your quick help&lt;/P&gt;

&lt;P&gt;Output im getting below:&lt;BR /&gt;
test Key1 value1&lt;BR /&gt;
test1 Date  Mon Jul 17 23:56:36 EDT 2017&lt;BR /&gt;
        \t size   597&lt;BR /&gt;
        \tAttribute  unmatched&lt;BR /&gt;
        \tContent  http&lt;BR /&gt;
test2 Date  Mon Jul 17 23:56:36 EDT 2017&lt;BR /&gt;
        \tsize   597&lt;BR /&gt;
        \tAttribute  unmatched&lt;BR /&gt;
        \tContent  http&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 08:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction/m-p/315413#M94420</guid>
      <dc:creator>SrinivasaC</dc:creator>
      <dc:date>2017-07-19T08:57:09Z</dc:date>
    </item>
  </channel>
</rss>

