<?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: Help extracting key value pairs within a grouped/nested field. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-key-value-pairs-within-a-grouped-nested-field/m-p/545668#M90953</link>
    <description>&lt;LI-CODE lang="markup"&gt;| makeresults
| eval msg.additionalValues="{field1=value1, field2=value2, field3=value3}"
| rex field=msg.additionalValues "(?&amp;lt;fields&amp;gt;[^{}]+)"
| rename fields as _raw
| extract pairdelim="," kvdelim="="&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 26 Mar 2021 23:29:44 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-03-26T23:29:44Z</dc:date>
    <item>
      <title>Help extracting key value pairs within a grouped/nested field.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-key-value-pairs-within-a-grouped-nested-field/m-p/545665#M90952</link>
      <description>&lt;P&gt;I'm trying to pull KV pairs from a event field, and having trouble. The issue is I don't know what the field names will be, nor how many. The parent field value also groups the KV pairs within braces, adding and additional layer of brain trauma.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In testing,&amp;nbsp;&amp;nbsp;/([^{=,]+)=([^,}]+)/g&amp;nbsp; does the job in regex101, but not splunk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Such as:&lt;/P&gt;&lt;P&gt;| makeresults&lt;/P&gt;&lt;P&gt;| eval msg.additionalValues="{field1=value1, field2=value2, field3=value3}"&lt;/P&gt;&lt;P&gt;| rex field=msg.additionalValues "/([^{=,]+)=([^,}]+)/g"&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results in:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error: "&lt;SPAN&gt;Error in 'rex' command: The regex '/([^{=,]+)=([^,}]+)/g' does not extract anything. It should specify at least one named group. Format: (?&amp;lt;name&amp;gt;...)."&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Since i have multiple named groups, how is this possible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 22:13:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-key-value-pairs-within-a-grouped-nested-field/m-p/545665#M90952</guid>
      <dc:creator>timgren</dc:creator>
      <dc:date>2021-03-26T22:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help extracting key value pairs within a grouped/nested field.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-key-value-pairs-within-a-grouped-nested-field/m-p/545668#M90953</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults
| eval msg.additionalValues="{field1=value1, field2=value2, field3=value3}"
| rex field=msg.additionalValues "(?&amp;lt;fields&amp;gt;[^{}]+)"
| rename fields as _raw
| extract pairdelim="," kvdelim="="&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Mar 2021 23:29:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-key-value-pairs-within-a-grouped-nested-field/m-p/545668#M90953</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-26T23:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help extracting key value pairs within a grouped/nested field.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-key-value-pairs-within-a-grouped-nested-field/m-p/545673#M90954</link>
      <description>&lt;P&gt;Excellent!&amp;nbsp; Can this solution be applied to an auto-extraction or transformation method?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 01:03:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-key-value-pairs-within-a-grouped-nested-field/m-p/545673#M90954</guid>
      <dc:creator>timgren</dc:creator>
      <dc:date>2021-03-27T01:03:47Z</dc:date>
    </item>
  </channel>
</rss>

