<?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 Splunk field seperators in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73369#M18359</link>
    <description>&lt;P&gt;I love Splunk's ability to dynamically pull fields at runtime with name=value pairs. &lt;BR /&gt;
I have several log formats which have a "key name: value" format or similar. The exact settings are:&lt;/P&gt;

&lt;P&gt;There may potentially be spaces in both the key name and value &lt;BR /&gt;
There are always two spaces between the colon and the value &lt;BR /&gt;
The value may be blank &lt;BR /&gt;
Each set of values is separated by three or four spaces&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Subject:   Security ID:  S-1-5-18   Account Name:  ACCOUNT$   Account Domain:  DOMAIN   Logon ID:  0x3e7    Process Information:   New Process ID:  0x1bdc  Another Field:  Test Results negative   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The regex I'm trying to use for my extraction is &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\s\s\s([^\s]+):\s\s(.*)\s\s\s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where am I going wrong?&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2011 15:59:44 GMT</pubDate>
    <dc:creator>timbCFCA</dc:creator>
    <dc:date>2011-09-12T15:59:44Z</dc:date>
    <item>
      <title>Splunk field seperators</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73369#M18359</link>
      <description>&lt;P&gt;I love Splunk's ability to dynamically pull fields at runtime with name=value pairs. &lt;BR /&gt;
I have several log formats which have a "key name: value" format or similar. The exact settings are:&lt;/P&gt;

&lt;P&gt;There may potentially be spaces in both the key name and value &lt;BR /&gt;
There are always two spaces between the colon and the value &lt;BR /&gt;
The value may be blank &lt;BR /&gt;
Each set of values is separated by three or four spaces&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Subject:   Security ID:  S-1-5-18   Account Name:  ACCOUNT$   Account Domain:  DOMAIN   Logon ID:  0x3e7    Process Information:   New Process ID:  0x1bdc  Another Field:  Test Results negative   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The regex I'm trying to use for my extraction is &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\s\s\s([^\s]+):\s\s(.*)\s\s\s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where am I going wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2011 15:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73369#M18359</guid>
      <dc:creator>timbCFCA</dc:creator>
      <dc:date>2011-09-12T15:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk field seperators</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73370#M18360</link>
      <description>&lt;P&gt;Use a regex that extracts the key and the value in transforms.conf.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[with_colon]
REGEX = \t([^\s:]+):\s(\S+)\t
FORMAT = $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Sep 2011 21:11:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73370#M18360</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-09-12T21:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk field seperators</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73371#M18361</link>
      <description>&lt;P&gt;well, the field name may include spaces.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 05:50:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73371#M18361</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-09-13T05:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk field seperators</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73372#M18362</link>
      <description>&lt;P&gt;I suppose the problem if the key or value may contain spaces is, how do you tell when one end and other begins, e.g., if you see:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;one two: three four five: six seven eight nine: ten eleven: twelve
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What would be the field names and what would be the values? Apparently &lt;CODE&gt;one two&lt;/CODE&gt; is a field, but is its value &lt;CODE&gt;three&lt;/CODE&gt; or &lt;CODE&gt;three four&lt;/CODE&gt;? And so on.&lt;/P&gt;

&lt;P&gt;If you can define that, then a regex can be created, but the idea is kind of what is in Ayn's answer.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 05:53:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73372#M18362</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-09-13T05:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk field seperators</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73373#M18363</link>
      <description>&lt;P&gt;There &lt;EM&gt;should&lt;/EM&gt; be a tab character between each set of fields so appending and prepending to the regex from Ayn should do the trick. I'll try it out and see how it goes.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 15:18:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73373#M18363</guid>
      <dc:creator>timbCFCA</dc:creator>
      <dc:date>2011-09-13T15:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk field seperators</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73374#M18364</link>
      <description>&lt;P&gt;True, I missed that in the question! Editing to reflect on that, and the info that tabs are at the start and end of each k/v pair.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 15:22:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73374#M18364</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-09-13T15:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk field seperators</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73375#M18365</link>
      <description>&lt;P&gt;Ayn, many thanks. I've done some additional research on the message format and updated the question accordingly. Could you take a look at what I need in the way of a regex?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 19:58:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-field-seperators/m-p/73375#M18365</guid>
      <dc:creator>timbCFCA</dc:creator>
      <dc:date>2011-09-13T19:58:36Z</dc:date>
    </item>
  </channel>
</rss>

