<?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 Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction/m-p/28442#M5631</link>
    <description>&lt;P&gt;I have a log file that looks like this:&lt;/P&gt;

&lt;P&gt;Wed Aug 11 14:27:48 GMT 2010 | Inactive Users Last 7 Days---&amp;gt; | 123456789 | 321654987 | 489756123 | 111000555&lt;/P&gt;

&lt;P&gt;Wed Aug 12 14:20:18 GMT 2010 | Inactive Users Last 7 Days---&amp;gt; | 123456789 | 321654987 | 489756123 | 111000555 | 222211145 | 789789741&lt;/P&gt;

&lt;P&gt;Basically I want to extract this into three fields, timestamp, range, and userID.  Currently I'm using a transform with a "|" deliminator.  The problem is, this is only getting the first userID, not the ones that follow. keep in mind, each event can have different amounts of userID's. For example, the first event has 4 userID's, and the second has 6 userID's, another could have 20. I want to extract them all into a single field.  &lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2010 02:03:50 GMT</pubDate>
    <dc:creator>carmackd</dc:creator>
    <dc:date>2010-08-12T02:03:50Z</dc:date>
    <item>
      <title>Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction/m-p/28442#M5631</link>
      <description>&lt;P&gt;I have a log file that looks like this:&lt;/P&gt;

&lt;P&gt;Wed Aug 11 14:27:48 GMT 2010 | Inactive Users Last 7 Days---&amp;gt; | 123456789 | 321654987 | 489756123 | 111000555&lt;/P&gt;

&lt;P&gt;Wed Aug 12 14:20:18 GMT 2010 | Inactive Users Last 7 Days---&amp;gt; | 123456789 | 321654987 | 489756123 | 111000555 | 222211145 | 789789741&lt;/P&gt;

&lt;P&gt;Basically I want to extract this into three fields, timestamp, range, and userID.  Currently I'm using a transform with a "|" deliminator.  The problem is, this is only getting the first userID, not the ones that follow. keep in mind, each event can have different amounts of userID's. For example, the first event has 4 userID's, and the second has 6 userID's, another could have 20. I want to extract them all into a single field.  &lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2010 02:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction/m-p/28442#M5631</guid>
      <dc:creator>carmackd</dc:creator>
      <dc:date>2010-08-12T02:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction/m-p/28443#M5632</link>
      <description>&lt;P&gt;I almost got it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=raw "Inactive Users Last 7 Days---&amp;gt;(?&amp;lt;users&amp;gt;.*)" | eval user=split(users," | ") | top user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, there's a empty user value. Get rid of that and you're done.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2010 04:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction/m-p/28443#M5632</guid>
      <dc:creator>hbazan</dc:creator>
      <dc:date>2010-08-12T04:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction/m-p/28444#M5633</link>
      <description>&lt;P&gt;rex with max_match?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "\|(?&amp;lt;users&amp;gt;[0-9]+)" max_match=100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should result in a users multi-valued field. (With a max of 100 users contained therein.)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2010 04:28:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction/m-p/28444#M5633</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2010-08-12T04:28:21Z</dc:date>
    </item>
  </channel>
</rss>

