<?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 on Splunk query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-on-Splunk-query/m-p/681760#M232973</link>
    <description>&lt;P&gt;There are a couple of ways to get the desired field from the ID.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=ID "-(?&amp;lt;Delimited_ID&amp;gt;[^-]+)"
``` OR ```
| eval tmp = split(ID, "-")
| eval Delimited_ID = mvindex(tmp,1)&lt;/LI-CODE&gt;&lt;P&gt;Use the new field in a &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command just as you would any other field.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count as Count by Delimited_ID, HTTP_responsecode&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Mar 2024 00:11:08 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2024-03-24T00:11:08Z</dc:date>
    <item>
      <title>Help on Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-Splunk-query/m-p/681757#M232971</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I have 4 fields in my index&amp;nbsp;&lt;BR /&gt;ID, Method, URL, HTTP_responsecode&lt;/P&gt;&lt;P&gt;ID is in the form of XXXX-YYYY-ZZZZ-AAAA,&amp;nbsp;&lt;BR /&gt;Now, I want to delimit the ID column and extract YYYY value then run a stats command with the delimited value by&amp;nbsp;HTTP_responsecode&lt;/P&gt;&lt;P&gt;Something as below&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Delimited_ID&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;HTTP_responsecode&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;YYYY&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;200&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please could you help on how to delimit the value in the above format mentioned and how to use the new delimited value in a stats command&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2024 22:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-Splunk-query/m-p/681757#M232971</guid>
      <dc:creator>suvi6789</dc:creator>
      <dc:date>2024-03-23T22:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-Splunk-query/m-p/681760#M232973</link>
      <description>&lt;P&gt;There are a couple of ways to get the desired field from the ID.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=ID "-(?&amp;lt;Delimited_ID&amp;gt;[^-]+)"
``` OR ```
| eval tmp = split(ID, "-")
| eval Delimited_ID = mvindex(tmp,1)&lt;/LI-CODE&gt;&lt;P&gt;Use the new field in a &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command just as you would any other field.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count as Count by Delimited_ID, HTTP_responsecode&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2024 00:11:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-Splunk-query/m-p/681760#M232973</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-03-24T00:11:08Z</dc:date>
    </item>
  </channel>
</rss>

