<?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: extract values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/extract-values/m-p/172091#M49331</link>
    <description>&lt;P&gt;I'm not good with regular expressions yet but here's how I would do it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;let's say your field is called 'revenue' and it's exactly the string you posted. Revenue 374256 318747 271437 271957
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;YOUR_SEARCH&gt; | REX field="revenue" "Revenue (?&lt;REV&gt;.*)" | eval rev=split(rev," ") | table revenue,rev&lt;/REV&gt;&lt;/YOUR_SEARCH&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;the REX command creates a field called 'rev' which simply remvoves the string "Revenue" from your original value&lt;/LI&gt;
&lt;LI&gt;The SPLIT function creates a multivalue field by breaking the value 'rev' on each space in the string&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;If you wanted to break your values into separate events you could add:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_search&amp;gt; | REX field="revenue" "Revenue (?&amp;lt;rev&amp;gt;.*)" | eval rev=split(rev," ") | mvexpand rev | table revenue,rev
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I admit I am still developing my understanding of regular expressions. You will likely find a way to use the single REX command along with REX's max_match="0" attribute to create a multivalue field from the REX generated value.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2013 14:49:09 GMT</pubDate>
    <dc:creator>jpass</dc:creator>
    <dc:date>2013-12-09T14:49:09Z</dc:date>
    <item>
      <title>extract values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-values/m-p/172089#M49329</link>
      <description>&lt;P&gt;I need to extract the following as different values for revenue.&lt;BR /&gt;
Revenue 374256  318747  271437  271957&lt;BR /&gt;
Was thinking of using rex command, but cant really work it out. Some help please..&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2013 14:20:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-values/m-p/172089#M49329</guid>
      <dc:creator>Abha</dc:creator>
      <dc:date>2013-12-09T14:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: extract values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-values/m-p/172090#M49330</link>
      <description>&lt;P&gt;Try following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your base search&amp;gt; | rex field=yourfield "Revenue (?P&amp;lt;Revenue&amp;gt;.+)" | eval Revenue=split(Revenue," ") | mvexpand Revenue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Dec 2013 14:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-values/m-p/172090#M49330</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-12-09T14:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: extract values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-values/m-p/172091#M49331</link>
      <description>&lt;P&gt;I'm not good with regular expressions yet but here's how I would do it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;let's say your field is called 'revenue' and it's exactly the string you posted. Revenue 374256 318747 271437 271957
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;YOUR_SEARCH&gt; | REX field="revenue" "Revenue (?&lt;REV&gt;.*)" | eval rev=split(rev," ") | table revenue,rev&lt;/REV&gt;&lt;/YOUR_SEARCH&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;the REX command creates a field called 'rev' which simply remvoves the string "Revenue" from your original value&lt;/LI&gt;
&lt;LI&gt;The SPLIT function creates a multivalue field by breaking the value 'rev' on each space in the string&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;If you wanted to break your values into separate events you could add:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_search&amp;gt; | REX field="revenue" "Revenue (?&amp;lt;rev&amp;gt;.*)" | eval rev=split(rev," ") | mvexpand rev | table revenue,rev
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I admit I am still developing my understanding of regular expressions. You will likely find a way to use the single REX command along with REX's max_match="0" attribute to create a multivalue field from the REX generated value.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2013 14:49:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-values/m-p/172091#M49331</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2013-12-09T14:49:09Z</dc:date>
    </item>
  </channel>
</rss>

