<?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 Splunk table and regex filter in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-table-and-regex-filter/m-p/466316#M131313</link>
    <description>&lt;P&gt;I have following data in "log" field,&lt;BR /&gt;
date1 name : message one&lt;BR /&gt;
date2 name : message two&lt;BR /&gt;
date3 name : message one&lt;BR /&gt;
date4 name : message one&lt;BR /&gt;
date5 name : message three&lt;BR /&gt;
date6 name : message three&lt;/P&gt;

&lt;P&gt;i want to filter this and create a table as below,&lt;BR /&gt;
columns &lt;BR /&gt;
log - count&lt;BR /&gt;
message one - 3&lt;BR /&gt;
message two - 1&lt;BR /&gt;
message three - 2&lt;/P&gt;

&lt;P&gt;how can i achieve this?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2019 19:05:17 GMT</pubDate>
    <dc:creator>mnjmht18</dc:creator>
    <dc:date>2019-12-16T19:05:17Z</dc:date>
    <item>
      <title>Splunk table and regex filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-table-and-regex-filter/m-p/466316#M131313</link>
      <description>&lt;P&gt;I have following data in "log" field,&lt;BR /&gt;
date1 name : message one&lt;BR /&gt;
date2 name : message two&lt;BR /&gt;
date3 name : message one&lt;BR /&gt;
date4 name : message one&lt;BR /&gt;
date5 name : message three&lt;BR /&gt;
date6 name : message three&lt;/P&gt;

&lt;P&gt;i want to filter this and create a table as below,&lt;BR /&gt;
columns &lt;BR /&gt;
log - count&lt;BR /&gt;
message one - 3&lt;BR /&gt;
message two - 1&lt;BR /&gt;
message three - 2&lt;/P&gt;

&lt;P&gt;how can i achieve this?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 19:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-table-and-regex-filter/m-p/466316#M131313</guid>
      <dc:creator>mnjmht18</dc:creator>
      <dc:date>2019-12-16T19:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk table and regex filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-table-and-regex-filter/m-p/466317#M131314</link>
      <description>&lt;P&gt;Try this query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=log "name : (?&amp;lt;log&amp;gt;.*)"
| stats count by log
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Dec 2019 19:29:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-table-and-regex-filter/m-p/466317#M131314</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-12-16T19:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk table and regex filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-table-and-regex-filter/m-p/466318#M131315</link>
      <description>&lt;P&gt;Hi @mnjmht18&lt;/P&gt;

&lt;P&gt;Try any one of the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval log="date1 name : message one,date2 name : message two,date3 name : message one,date4 name : message one,date5 name : message three,date6 name : message three" 
| makemv delim="," log 
| mvexpand log 
| rex field=log "name :\s+(?P&amp;lt;log&amp;gt;[^:]+)$" 
| stats count by log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval log="date1 name : message one,date2 name : message two,date3 name : message one,date4 name : message one,date5 name : message three,date6 name : message three" 
| makemv delim="," log 
| mvexpand log 
| eval log= mvindex(split(log,"name :"),-1) 
| stats count by log
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Dec 2019 01:41:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-table-and-regex-filter/m-p/466318#M131315</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-12-17T01:41:24Z</dc:date>
    </item>
  </channel>
</rss>

