<?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 fields using colon (:) except time field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319871#M95612</link>
    <description>&lt;P&gt;hey try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval _raw="INFO : LM_36488 [Thu Jan 18 17:00:18 2018] : (11616|15356) Session task instance [Big_Data_Job] : [TM_6721 Started [Fetch Session from Repository].]" | rex field=_raw "^(?&amp;lt;field1&amp;gt;[^\:]+)\s:\s(?&amp;lt;field2&amp;gt;[^\]]+])\s:\s(?&amp;lt;field3&amp;gt;[^\]]+])\s:\s(?&amp;lt;field4&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_search&amp;gt; |rex field=_raw "^(?&amp;lt;field1&amp;gt;[^\:]+)\s:\s(?&amp;lt;field2&amp;gt;[^\]]+])\s:\s(?&amp;lt;field3&amp;gt;[^\]]+])\s:\s(?&amp;lt;field4&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2018 13:44:41 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-01-19T13:44:41Z</dc:date>
    <item>
      <title>Extract fields using colon (:) except time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319869#M95610</link>
      <description>&lt;P&gt;Hello, &lt;BR /&gt;
I'm trying to use the field extraction tool for a data file that where the fields are delineated by a colon(:).  However, the time fields ALSO contains a colon, so it doesn't extract this field correctly.   Any thoughts on how to work around this? Sample Event Below&lt;/P&gt;

&lt;P&gt;INFO : LM_36488 [Thu Jan 18 17:00:18 2018] : (11616|15356) Session task instance [Big_Data_Job] : [TM_6721 Started [Fetch Session from Repository].]&lt;/P&gt;

&lt;P&gt;Predictably, this gets broken out like this&lt;BR /&gt;
INFO &lt;BR /&gt;
 LM_36488 &lt;A href="https://community.splunk.com/11616%7C15356" target="_blank"&gt;Thu Jan 18 17&lt;BR /&gt;
00&lt;BR /&gt;
18 2018&lt;/A&gt; Session task instance [Big_Data_Job] &lt;BR /&gt;
[TM_6721 Started [Fetch Session from Repository].]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319869#M95610</guid>
      <dc:creator>richnavis</dc:creator>
      <dc:date>2020-09-29T17:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields using colon (:) except time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319870#M95611</link>
      <description>&lt;P&gt;Hey richnavis,&lt;/P&gt;

&lt;P&gt;when you do field extractions do "regular expressions" instead of "delimeters". &lt;BR /&gt;
Then click "write your regular expression yourself" and paste this regex in:&lt;BR /&gt;
&lt;CODE&gt;(?&amp;lt;field1&amp;gt;[^\:]+)\s+?\:\s+?(?&amp;lt;field2&amp;gt;[^\[]+)\s+?\[(?&amp;lt;date&amp;gt;[^\]]+)\]\s+?\:\s+?(?&amp;lt;field4&amp;gt;[^\:]+)\s+?\:\s+?(?&amp;lt;field5&amp;gt;[^$]+)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;substitute the "fieldX" values with the names your actual fields should have&lt;/P&gt;

&lt;P&gt;Cheers!&lt;/P&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/ghD0XE/2"&gt;https://regex101.com/r/ghD0XE/2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 13:21:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319870#M95611</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2018-01-19T13:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields using colon (:) except time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319871#M95612</link>
      <description>&lt;P&gt;hey try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval _raw="INFO : LM_36488 [Thu Jan 18 17:00:18 2018] : (11616|15356) Session task instance [Big_Data_Job] : [TM_6721 Started [Fetch Session from Repository].]" | rex field=_raw "^(?&amp;lt;field1&amp;gt;[^\:]+)\s:\s(?&amp;lt;field2&amp;gt;[^\]]+])\s:\s(?&amp;lt;field3&amp;gt;[^\]]+])\s:\s(?&amp;lt;field4&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_search&amp;gt; |rex field=_raw "^(?&amp;lt;field1&amp;gt;[^\:]+)\s:\s(?&amp;lt;field2&amp;gt;[^\]]+])\s:\s(?&amp;lt;field3&amp;gt;[^\]]+])\s:\s(?&amp;lt;field4&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 13:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319871#M95612</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-19T13:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields using colon (:) except time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319872#M95613</link>
      <description>&lt;P&gt;@richnavis, any success with trying out the suggested solutions yet?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-using-colon-except-time-field/m-p/319872#M95613</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2018-01-22T14:45:38Z</dc:date>
    </item>
  </channel>
</rss>

