<?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: How to split data into multiple columns? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-data-into-multiple-columns/m-p/436594#M124412</link>
    <description>&lt;P&gt;Hi @ayush1906&lt;/P&gt;

&lt;P&gt;Try like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval msg="1. xyz 2. dsh bh 3. sdh dsd() 4. trrt" 
| rex field=msg max_match=0 "(?P&amp;lt;no&amp;gt;\d+).\s(?P&amp;lt;name&amp;gt;[a-z\s]*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 11 Mar 2019 11:57:26 GMT</pubDate>
    <dc:creator>vnravikumar</dc:creator>
    <dc:date>2019-03-11T11:57:26Z</dc:date>
    <item>
      <title>How to split data into multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-data-into-multiple-columns/m-p/436592#M124410</link>
      <description>&lt;P&gt;I am having data in a single field in this format:&lt;BR /&gt;
&lt;CODE&gt;1. xyz 2. dsh bh 3. sdh dsd() 4. trrt&lt;/CODE&gt; .... so on &lt;/P&gt;

&lt;P&gt;I want to split this data into multiple column like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;no.  |    name
1           xyz
2          dsh bh
3          sdh dsd
4          trrt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried using delimiter but not getting the expected result.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 10:37:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-data-into-multiple-columns/m-p/436592#M124410</guid>
      <dc:creator>ayush1906</dc:creator>
      <dc:date>2019-03-11T10:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to split data into multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-data-into-multiple-columns/m-p/436593#M124411</link>
      <description>&lt;P&gt;Hi @ayush1906,&lt;/P&gt;

&lt;P&gt;Based on sample data you can try below query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourBaseSearch&amp;gt;
| rex field=_raw "(?&amp;lt;a&amp;gt;\d+)\.\s(?&amp;lt;b&amp;gt;[^\d]*)(?:$|\s)" max_match=0
| eval c=mvzip(a,b)
| mvexpand c
| eval no=mvindex(split(c,","),0), name=mvindex(split(c,","),1)
| rex field=name mode=sed "s/\(\)//g"
| table no, name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is run anywhere search based on sample data&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="1. xyz 2. dsh bh 3. sdh dsd() 4. trrt"
| rex field=_raw "(?&amp;lt;a&amp;gt;\d+)\.\s(?&amp;lt;b&amp;gt;[^\d]*)(?:$|\s)" max_match=0
| eval c=mvzip(a,b)
| mvexpand c
| eval no=mvindex(split(c,","),0), name=mvindex(split(c,","),1)
| rex field=name mode=sed "s/\(\)//g"
| table no, name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Mar 2019 11:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-data-into-multiple-columns/m-p/436593#M124411</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-11T11:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to split data into multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-data-into-multiple-columns/m-p/436594#M124412</link>
      <description>&lt;P&gt;Hi @ayush1906&lt;/P&gt;

&lt;P&gt;Try like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval msg="1. xyz 2. dsh bh 3. sdh dsd() 4. trrt" 
| rex field=msg max_match=0 "(?P&amp;lt;no&amp;gt;\d+).\s(?P&amp;lt;name&amp;gt;[a-z\s]*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Mar 2019 11:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-data-into-multiple-columns/m-p/436594#M124412</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-03-11T11:57:26Z</dc:date>
    </item>
  </channel>
</rss>

