<?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: converting an triming field values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395771#M190831</link>
    <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval capacity_gb = "$8,191.75" 
| eval capacity_gb = replace(capacity_gb,"\$","")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 13 Jul 2019 07:23:34 GMT</pubDate>
    <dc:creator>vnravikumar</dc:creator>
    <dc:date>2019-07-13T07:23:34Z</dc:date>
    <item>
      <title>converting an triming field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395767#M190827</link>
      <description>&lt;P&gt;I need to to convert this field in to a number and remove the $ capacity_gb = $8,191.75, I've tried eval to num and convert, but nothing worked.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 16:54:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395767#M190827</guid>
      <dc:creator>codedtech</dc:creator>
      <dc:date>2019-07-12T16:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: converting an triming field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395768#M190828</link>
      <description>&lt;P&gt;To clarify, what do you get from &lt;CODE&gt;| eval x = tonumber(capacity_gb) | table capacity_gb x&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 18:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395768#M190828</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-07-12T18:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: converting an triming field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395769#M190829</link>
      <description>&lt;P&gt;Yes, and the output is displayed like this:&lt;BR /&gt;
capacity_gb x&lt;BR /&gt;
$8,191.75    &lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 19:43:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395769#M190829</guid>
      <dc:creator>codedtech</dc:creator>
      <dc:date>2019-07-12T19:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: converting an triming field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395770#M190830</link>
      <description>&lt;P&gt;@codedtech .&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex mode=sed field=capacity_gb "s/[^\d\.]//g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you need &lt;CODE&gt;,&lt;/CODE&gt; also part of you value, just add &lt;CODE&gt;,&lt;/CODE&gt; to the square bracket&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 05:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395770#M190830</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-07-13T05:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: converting an triming field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395771#M190831</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval capacity_gb = "$8,191.75" 
| eval capacity_gb = replace(capacity_gb,"\$","")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Jul 2019 07:23:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-an-triming-field-values/m-p/395771#M190831</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-13T07:23:34Z</dc:date>
    </item>
  </channel>
</rss>

