<?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 extract a number of a string and check the count? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613225#M213108</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228188"&gt;@zoe&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the format is always the same, you can use a regex like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index 
| rex "A-(?&amp;lt;number&amp;gt;\d+)"
| stats count BY number&lt;/LI-CODE&gt;&lt;P&gt;you can test the regex at&amp;nbsp;&lt;A href="https://regex101.com/r/H1gAHF/1" target="_blank"&gt;https://regex101.com/r/H1gAHF/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 13:25:23 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-09-15T13:25:23Z</dc:date>
    <item>
      <title>How to extract a number of a string and check the count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613224#M213107</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have data like A-001, A-002, A-003.....&lt;/P&gt;
&lt;P&gt;I would like to know how to extract the numbers from these strings: 001, 002, 003....so that I can generate an alert: every three batche (001, 004, 007) should be check.&lt;/P&gt;
&lt;P&gt;Can someone help me with that? Thanks1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Tong&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 15:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613224#M213107</guid>
      <dc:creator>zoe</dc:creator>
      <dc:date>2022-09-15T15:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a number of a string and check the count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613225#M213108</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228188"&gt;@zoe&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the format is always the same, you can use a regex like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index 
| rex "A-(?&amp;lt;number&amp;gt;\d+)"
| stats count BY number&lt;/LI-CODE&gt;&lt;P&gt;you can test the regex at&amp;nbsp;&lt;A href="https://regex101.com/r/H1gAHF/1" target="_blank"&gt;https://regex101.com/r/H1gAHF/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 13:25:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613225#M213108</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-15T13:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a number of a string and check the count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613288#M213139</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;great! Thanks for the Tipp. It is exactly what I want. Many thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tong&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 17:26:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613288#M213139</guid>
      <dc:creator>zoe</dc:creator>
      <dc:date>2022-09-15T17:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a number of a string and check the count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613339#M213159</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228188"&gt;@zoe&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 05:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-number-of-a-string-and-check-the-count/m-p/613339#M213159</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-16T05:32:13Z</dc:date>
    </item>
  </channel>
</rss>

