<?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 How to extract fields without regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-without-regex/m-p/198497#M57401</link>
    <description>&lt;P&gt;I'm trying to extract fields from a message containing the following string..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;'database'=running 'management'=running 'runtime'=running 'adclient'=running 'ntpd'=running 'logforward'=running,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying to create fields such as database, management, etc. that will store a value of running, down, etc.  I tried using regex from the interactive field extractor but once I try to extract 'runtime' or anything past that, no regex can be extracted.  Are there any simple ways of doing what I need to do?&lt;/P&gt;</description>
    <pubDate>Fri, 29 Aug 2014 17:05:25 GMT</pubDate>
    <dc:creator>ahooper239</dc:creator>
    <dc:date>2014-08-29T17:05:25Z</dc:date>
    <item>
      <title>How to extract fields without regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-without-regex/m-p/198497#M57401</link>
      <description>&lt;P&gt;I'm trying to extract fields from a message containing the following string..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;'database'=running 'management'=running 'runtime'=running 'adclient'=running 'ntpd'=running 'logforward'=running,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying to create fields such as database, management, etc. that will store a value of running, down, etc.  I tried using regex from the interactive field extractor but once I try to extract 'runtime' or anything past that, no regex can be extracted.  Are there any simple ways of doing what I need to do?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2014 17:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-without-regex/m-p/198497#M57401</guid>
      <dc:creator>ahooper239</dc:creator>
      <dc:date>2014-08-29T17:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields without regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-without-regex/m-p/198498#M57402</link>
      <description>&lt;P&gt;Splunk can parse events of the form field=value, but I think the quotes in your example will be problematic.&lt;/P&gt;

&lt;P&gt;A rex query is simple enough, assuming your fields are always in the same order.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search&amp;gt; | rex "'database'=(?&amp;lt;database&amp;gt;\w+)\s'management'=(?&amp;lt;management&amp;gt;\w+)\s'runtime'=(?&amp;lt;runtime&amp;gt;\w+)\s ..." | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works in RegExr, but I haven't verified the quotes won't confuse Splunk.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2014 19:22:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-without-regex/m-p/198498#M57402</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-08-29T19:22:45Z</dc:date>
    </item>
  </channel>
</rss>

