<?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 to remove brackets and commas from data, sort into a CSV, and dedup in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310068#M58258</link>
    <description>&lt;P&gt;You could do this at search time, and have a set of events with one of the items per event. Is that sufficient? Or do you require that the data come in to be indexed with one item per event?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Aug 2017 16:20:53 GMT</pubDate>
    <dc:creator>cpetterborg</dc:creator>
    <dc:date>2017-08-30T16:20:53Z</dc:date>
    <item>
      <title>Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310067#M58257</link>
      <description>&lt;P&gt;I have data which looks like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[000003074859, 000003075752, 000003224575, 000003228286, 000003235217, 000003246379, 000003246434, 000003246725, 000003246934, 000003248574]
[0010242946, 0002363081, 000006459131, 0010275565, 000000430019, 000000465470, 000000465546, 000003228900, 000003616661, 000003648249]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to:&lt;/P&gt;

&lt;P&gt;1) Remove the brackets and commas&lt;BR /&gt;
2) Change the CSV into one row per entry&lt;BR /&gt;
3) dedup&lt;/P&gt;

&lt;P&gt;So, the final data would look like:&lt;BR /&gt;
000003074859&lt;BR /&gt;
000003075752&lt;BR /&gt;
000003224575&lt;BR /&gt;
....................&lt;/P&gt;

&lt;P&gt;Thank you very much in advance&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:15:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310067#M58257</guid>
      <dc:creator>bpolsen</dc:creator>
      <dc:date>2017-08-30T16:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310068#M58258</link>
      <description>&lt;P&gt;You could do this at search time, and have a set of events with one of the items per event. Is that sufficient? Or do you require that the data come in to be indexed with one item per event?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:20:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310068#M58258</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-08-30T16:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310069#M58259</link>
      <description>&lt;P&gt;The data I show is the result of a search, and shows two events. I'd like to show the data as a dedup'ed series of rows, one entry per row. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310069#M58259</guid>
      <dc:creator>bpolsen</dc:creator>
      <dc:date>2017-08-30T16:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310070#M58260</link>
      <description>&lt;P&gt;If the data shown here is result of search what is the fieldname?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:48:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310070#M58260</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-30T16:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310071#M58261</link>
      <description>&lt;P&gt;Following is a run-anywhere search based on your example. Pipes till &lt;CODE&gt;| table data&lt;/CODE&gt; generates mock data. You would require the pipes after that. Also replace with your field name instead of &lt;CODE&gt;data&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval data="[000003074859, 000003075752, 000003224575, 000003228286, 000003235217, 000003246379, 000003246434, 000003246725, 000003246934, 000003248574]"
| append 
    [| makeresults
    | eval data="[0010242946, 0002363081, 000006459131, 0010275565, 000000430019, 000000465470, 000000465546, 000003228900, 000003616661, 000003648249]"]
| table data
| eval data=replace(replace(data,"\[",""),"\]","")
| eval data=split(data,",")
| mvexpand data
| sort num(data)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:55:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310071#M58261</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-30T16:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310072#M58262</link>
      <description>&lt;P&gt;And a little simpler version thane niketnilay's:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults 
|  eval _raw="[000003074859, 000003075752, 000003224575, 000003228286, 000003235217, 000003246379, 000003246434, 000003246725, 000003246934, 000003248574]
[0010242946, 0002363081, 000006459131, 0010275565, 000000430019, 000000465470, 000000465546, 000003228900, 000003616661, 000003648249]" 
|  rex max_match=0 "(?P&amp;lt;myfield&amp;gt;\d+)" 
|  mvexpand myfield 
|  table myfield
|  dedup myfield
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310072#M58262</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-08-30T16:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310073#M58263</link>
      <description>&lt;P&gt;Gentlemen,&lt;BR /&gt;
      Thank you so very much! I was able to cobble together a search that meets my needs, thanks to your guidance. Much appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 17:08:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310073#M58263</guid>
      <dc:creator>bpolsen</dc:creator>
      <dc:date>2017-08-30T17:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310074#M58264</link>
      <description>&lt;P&gt;@bpolsen, if one of the answer here has helped, do not forget to Accept the same to mark it as answered. Please also up vote the answered that have helped you. If you used something other than the examples here then kindly add that as answer and accept the same.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 17:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310074#M58264</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-30T17:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help to remove brackets and commas from data, sort into a CSV, and dedup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310075#M58265</link>
      <description>&lt;P&gt;@cpetterborg... upvoting... obviously this is simpler working example &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 18:26:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-to-remove-brackets-and-commas-from-data-sort-into-a-CSV-and/m-p/310075#M58265</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-30T18:26:58Z</dc:date>
    </item>
  </channel>
</rss>

