<?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: Check for pure numeric field values or alphanumeric in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297021#M89596</link>
    <description>&lt;P&gt;@AshimaE, can you please test and confirm whether the suggested change works for you?&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2017 17:05:08 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-07-07T17:05:08Z</dc:date>
    <item>
      <title>Check for pure numeric field values or alphanumeric</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297018#M89593</link>
      <description>&lt;P&gt;I have extracted a field using regex having the name &lt;STRONG&gt;push&lt;/STRONG&gt;. I now have to classify all my rows into two categories based on whether push is all numeric or contains some alphabets also. Let it be divided into classes pure and mixed and given in a field class.&lt;BR /&gt;
Any suggestions on how to do this since the numbers involved are too huge going upto 15-20 characters.How to fill in the class field for this statement.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 09:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297018#M89593</guid>
      <dc:creator>AshimaE</dc:creator>
      <dc:date>2017-07-06T09:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Check for pure numeric field values or alphanumeric</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297019#M89594</link>
      <description>&lt;P&gt;Hi AshimaE,&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| rex field=push "(?&amp;lt;type_num&amp;gt;[0-9]*)"
| eval type=if(type_num=*,"Numeric","Alfanumeric")
| stats count by type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 09:59:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297019#M89594</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-07-06T09:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Check for pure numeric field values or alphanumeric</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297020#M89595</link>
      <description>&lt;P&gt;Hi Ashima, you can use isnum() evaluation function. Following is run-anywhere search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval push="TestData123"
| eval class=if(isnum(push),"numeric","alpha")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: Above one will treat negative and decimal numbers also as numeric.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 10:51:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297020#M89595</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-06T10:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Check for pure numeric field values or alphanumeric</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297021#M89596</link>
      <description>&lt;P&gt;@AshimaE, can you please test and confirm whether the suggested change works for you?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 17:05:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-for-pure-numeric-field-values-or-alphanumeric/m-p/297021#M89596</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-07T17:05:08Z</dc:date>
    </item>
  </channel>
</rss>

