<?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 -- regex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction-regex-help/m-p/334100#M99303</link>
    <description>&lt;P&gt;cheers. it worked. I had to make a slight amendment, but the concept is the same. &lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2017 09:18:54 GMT</pubDate>
    <dc:creator>koshyk</dc:creator>
    <dc:date>2017-09-14T09:18:54Z</dc:date>
    <item>
      <title>Key-value pair extraction -- regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction-regex-help/m-p/334098#M99301</link>
      <description>&lt;P&gt;We have some snmp data and want to extract the data as a key-value pair&lt;/P&gt;

&lt;P&gt;Sample&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var.12345.5.5 = INTEGER: 10 myTag::var.12345.5.9 = STRING: "abc"    myTag::var.12345.5.3 = STRING: "admin"  myTag::var.12345.5.4 = STRING: "developer"
var.12345.5.5 = INTEGER: 10 myTag::var.12345.5.9 = STRING: "xyz"    myTag::var.12345.5.3 = STRING: "user1"  myTag::var.12345.5.4 = STRING: "support"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;output required&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var_12345_5_9,var_12345_5_3,var_12345_5_4
abc,admin,developer
xyz,user1,support
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried a basic &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=var\.([^ ]+)\s=\s(\S+)
FORMAT = $1::$2
CLEAN_KEYS = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But can you please help in making it a bit more better?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 17:02:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction-regex-help/m-p/334098#M99301</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2017-09-13T17:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Key-value pair extraction -- regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction-regex-help/m-p/334099#M99302</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=(var\S+)\s+=\s+[^\"]+([^\"]+)
FORMAT = $1::$2
CLEAN_KEYS = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Sep 2017 17:31:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction-regex-help/m-p/334099#M99302</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-13T17:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Key-value pair extraction -- regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction-regex-help/m-p/334100#M99303</link>
      <description>&lt;P&gt;cheers. it worked. I had to make a slight amendment, but the concept is the same. &lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 09:18:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Key-value-pair-extraction-regex-help/m-p/334100#M99303</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2017-09-14T09:18:54Z</dc:date>
    </item>
  </channel>
</rss>

