<?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: two values for same id how to get the second value ? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490266#M8805</link>
    <description>&lt;P&gt;If the format is consistent, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=result "\[[\S\W]+\sid=(?&amp;lt;second_id&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See &lt;A href="https://regex101.com/r/p0RcVe/1"&gt;https://regex101.com/r/p0RcVe/1&lt;/A&gt; to compare this regex&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2019 15:10:45 GMT</pubDate>
    <dc:creator>wmyersas</dc:creator>
    <dc:date>2019-11-26T15:10:45Z</dc:date>
    <item>
      <title>two values for same id how to get the second value ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490264#M8803</link>
      <description>&lt;P&gt;I have a result which shows two values for the same Id and I want the value of the second Id in table&lt;/P&gt;

&lt;P&gt;result&lt;BR /&gt;
class=com.something.something .something [id=requestid=7375de3b-b524-4a4d-85e5-c6b7cb0fb7b1 id=201231]&lt;BR /&gt;
class=com.something.something .something [id=requestid=70dbdd62-7fd3-4178-a082-f27c0866279a id=151232]&lt;BR /&gt;
class=com.something.something .something [id=requestid=34b96d23-1340-4f9a-b518-d95b8ae853a5 id=671235]&lt;BR /&gt;
class=com.something.something .something [id=requestid=1845de3b-a524-1a4d-75e5-a1b7bb1fb7b2 id=921239] &lt;/P&gt;

&lt;P&gt;so I want in result 201231,151232,671235,921239&lt;/P&gt;

&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 08:21:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490264#M8803</guid>
      <dc:creator>ravirajaka</dc:creator>
      <dc:date>2019-11-26T08:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: two values for same id how to get the second value ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490265#M8804</link>
      <description>&lt;P&gt;@ravirajaka ,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"base search"|rex field="your fieldname" "\bid=(?&amp;lt;second_id&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 09:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490265#M8804</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-11-26T09:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: two values for same id how to get the second value ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490266#M8805</link>
      <description>&lt;P&gt;If the format is consistent, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=result "\[[\S\W]+\sid=(?&amp;lt;second_id&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See &lt;A href="https://regex101.com/r/p0RcVe/1"&gt;https://regex101.com/r/p0RcVe/1&lt;/A&gt; to compare this regex&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 15:10:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490266#M8805</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2019-11-26T15:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: two values for same id how to get the second value ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490267#M8806</link>
      <description>&lt;P&gt;Set &lt;CODE&gt;KV_MODE = auto&lt;/CODE&gt; on your Search Head and then do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval id2=mvindex(id, 1)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 23:58:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/two-values-for-same-id-how-to-get-the-second-value/m-p/490267#M8806</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-26T23:58:42Z</dc:date>
    </item>
  </channel>
</rss>

