<?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 How to extract this field which may have multiple values separated by pipes? (offerId=&amp;quot;ABC_79|ABC_80|ABC_81|ABC_56&amp;quot; or offerId=&amp;quot;ABC_79&amp;quot;) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field-which-may-have-multiple-values/m-p/252120#M75411</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;Can you help me with the search to extract the following? The &lt;STRONG&gt;offerId&lt;/STRONG&gt; may come in the log as &lt;CODE&gt;offerId="ABC_79|ABC_80|ABC_81|ABC_56"&lt;/CODE&gt; separated by pipes (if there are multiple records) or just &lt;CODE&gt;offerId="ABC_79"&lt;/CODE&gt; (if there is just one offer). &lt;/P&gt;

&lt;P&gt;So how do I extract the offerId's to a new field &lt;STRONG&gt;offerName&lt;/STRONG&gt;?&lt;/P&gt;

&lt;P&gt;The final output would be:&lt;BR /&gt;
OfferName:&lt;BR /&gt;
ABC_79&lt;BR /&gt;
ABC_80&lt;BR /&gt;
ABC_81&lt;BR /&gt;
ABC_56&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 08:34:42 GMT</pubDate>
    <dc:creator>Kukkadapu</dc:creator>
    <dc:date>2020-09-29T08:34:42Z</dc:date>
    <item>
      <title>How to extract this field which may have multiple values separated by pipes? (offerId="ABC_79|ABC_80|ABC_81|ABC_56" or offerId="ABC_79")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field-which-may-have-multiple-values/m-p/252120#M75411</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;Can you help me with the search to extract the following? The &lt;STRONG&gt;offerId&lt;/STRONG&gt; may come in the log as &lt;CODE&gt;offerId="ABC_79|ABC_80|ABC_81|ABC_56"&lt;/CODE&gt; separated by pipes (if there are multiple records) or just &lt;CODE&gt;offerId="ABC_79"&lt;/CODE&gt; (if there is just one offer). &lt;/P&gt;

&lt;P&gt;So how do I extract the offerId's to a new field &lt;STRONG&gt;offerName&lt;/STRONG&gt;?&lt;/P&gt;

&lt;P&gt;The final output would be:&lt;BR /&gt;
OfferName:&lt;BR /&gt;
ABC_79&lt;BR /&gt;
ABC_80&lt;BR /&gt;
ABC_81&lt;BR /&gt;
ABC_56&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field-which-may-have-multiple-values/m-p/252120#M75411</guid>
      <dc:creator>Kukkadapu</dc:creator>
      <dc:date>2020-09-29T08:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract this field which may have multiple values separated by pipes? (offerId="ABC_79|ABC_80|ABC_81|ABC_56" or offerId="ABC_79")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field-which-may-have-multiple-values/m-p/252121#M75412</link>
      <description>&lt;P&gt;Something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | eval offerName=split(offer_id,"|") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | makemv offerId delim="|"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jan 2016 17:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field-which-may-have-multiple-values/m-p/252121#M75412</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-01-29T17:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract this field which may have multiple values separated by pipes? (offerId="ABC_79|ABC_80|ABC_81|ABC_56" or offerId="ABC_79")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field-which-may-have-multiple-values/m-p/252122#M75413</link>
      <description>&lt;P&gt;Perfect! It worked . Thanks for your time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 17:14:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field-which-may-have-multiple-values/m-p/252122#M75413</guid>
      <dc:creator>Kukkadapu</dc:creator>
      <dc:date>2016-01-29T17:14:13Z</dc:date>
    </item>
  </channel>
</rss>

