<?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 how to get extract field in a numeric format? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-extract-field-in-a-numeric-format/m-p/445674#M126416</link>
    <description>&lt;P&gt;I'm trying to extract value from a field in the raw text using a regular expression.  I want the field &lt;STRONG&gt;values&lt;/STRONG&gt; to be extracted in numeric format, but when I field extraction the value is in a string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"values":[17.4991095961511,17.4991095961511],"dstypes":["derive","derive"],"dsnames":["io_time","weighted_io_time"],"time":1565729243.743,"interval":2,"host":"node1-zanzibar","plugin":"disk","plugin_instance":"sda","type":"disk_io_time","type_instance":""}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I used the below expression,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\{"(?P&amp;lt;values&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which captures the &lt;STRONG&gt;values&lt;/STRONG&gt; field but not the values relative to that field. &lt;BR /&gt;
So I tried with adding d+&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\{"(?P&amp;lt;values&amp;gt;\d+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There was no result. can anyone help me solve this?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2019 20:56:22 GMT</pubDate>
    <dc:creator>gwtm_hak</dc:creator>
    <dc:date>2019-08-13T20:56:22Z</dc:date>
    <item>
      <title>how to get extract field in a numeric format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-extract-field-in-a-numeric-format/m-p/445674#M126416</link>
      <description>&lt;P&gt;I'm trying to extract value from a field in the raw text using a regular expression.  I want the field &lt;STRONG&gt;values&lt;/STRONG&gt; to be extracted in numeric format, but when I field extraction the value is in a string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"values":[17.4991095961511,17.4991095961511],"dstypes":["derive","derive"],"dsnames":["io_time","weighted_io_time"],"time":1565729243.743,"interval":2,"host":"node1-zanzibar","plugin":"disk","plugin_instance":"sda","type":"disk_io_time","type_instance":""}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I used the below expression,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\{"(?P&amp;lt;values&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which captures the &lt;STRONG&gt;values&lt;/STRONG&gt; field but not the values relative to that field. &lt;BR /&gt;
So I tried with adding d+&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\{"(?P&amp;lt;values&amp;gt;\d+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There was no result. can anyone help me solve this?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 20:56:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-extract-field-in-a-numeric-format/m-p/445674#M126416</guid>
      <dc:creator>gwtm_hak</dc:creator>
      <dc:date>2019-08-13T20:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to get extract field in a numeric format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-extract-field-in-a-numeric-format/m-p/445675#M126417</link>
      <description>&lt;P&gt;Can you try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults 
|eval _raw=" {\"values\":[17.4991095961511,17.4991095961511],\"dstypes\":[\"derive\",\"derive\"],\"dsnames\":[\"io_time\",\"weighted_io_time\"],\"time\":1565729243.743,\"interval\":2,\"host\":\"node1-zanzibar\",\"plugin\":\"disk\",\"plugin_instance\":\"sda\",\"type\":\"disk_io_time\",\"type_instance\":\"\"} " 

 | rex field=_raw "\{\"values\"\:\[(?&amp;lt;values&amp;gt;.*?)\s*\]\," max_match=0 
 | makemv delim="," values  
 | mvexpand values
 | table values
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Aug 2019 23:43:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-extract-field-in-a-numeric-format/m-p/445675#M126417</guid>
      <dc:creator>nareshinsvu</dc:creator>
      <dc:date>2019-08-13T23:43:39Z</dc:date>
    </item>
  </channel>
</rss>

