<?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: Iterative fields with spaces in values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Iterative-fields-with-spaces-in-values/m-p/38779#M8844</link>
    <description>&lt;P&gt;You could build a regex that looks for field2= or $ after extracting field1=[^=]+, that way it should walk right up to the next field name but not include it.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2013 09:15:31 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-02-21T09:15:31Z</dc:date>
    <item>
      <title>Iterative fields with spaces in values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Iterative-fields-with-spaces-in-values/m-p/38778#M8843</link>
      <description>&lt;P&gt;I'm having trouble with the way Splunk parses some of my logs which has field=value pairs that have values with unquoted values with spaces.  Example:&lt;BR /&gt;
_raw = some|segmented|text|field1=value1 field2=value2 field3=a third value field4=my forth value field5=value5 field6=one more with spaces&lt;/P&gt;

&lt;P&gt;I've already broken it up so I get the following field:&lt;BR /&gt;
GENERIC = field1=value1 field2=value2 field3=a third value field4=my forth value field5=value5 field6=one more with spaces&lt;/P&gt;

&lt;P&gt;The problem is Splunks parsing automatically determines this:&lt;BR /&gt;
field1=value1&lt;BR /&gt;
field2=value2&lt;BR /&gt;
field3=a&lt;BR /&gt;
field4=my&lt;BR /&gt;
field5=value5&lt;BR /&gt;
field6=one&lt;/P&gt;

&lt;P&gt;should be:&lt;BR /&gt;
field1=value1&lt;BR /&gt;
field2=value2&lt;BR /&gt;
field3=a third value&lt;BR /&gt;
field4=my forth value&lt;BR /&gt;
field5=value5&lt;BR /&gt;
field6=one more with spaces&lt;/P&gt;

&lt;P&gt;I've tried using regexes with rex, but the problem is that all of these fields are optional, and I don't necessarily have a complete list of fields yet.&lt;BR /&gt;
Most recently I've been trying to use sed to put a \n in front of anything with an = sign after it, but that hasn't worked so well.&lt;/P&gt;

&lt;P&gt;Good news is, from everything I can tell, the fields don't have spaces in them.&lt;BR /&gt;
{edited for formatting}&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2013 04:08:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Iterative-fields-with-spaces-in-values/m-p/38778#M8843</guid>
      <dc:creator>michaelbrunetto</dc:creator>
      <dc:date>2013-02-21T04:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Iterative fields with spaces in values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Iterative-fields-with-spaces-in-values/m-p/38779#M8844</link>
      <description>&lt;P&gt;You could build a regex that looks for field2= or $ after extracting field1=[^=]+, that way it should walk right up to the next field name but not include it.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2013 09:15:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Iterative-fields-with-spaces-in-values/m-p/38779#M8844</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-21T09:15:31Z</dc:date>
    </item>
  </channel>
</rss>

