<?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 split field in props.conf using EVAL? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-field-in-props-conf-using-EVAL/m-p/396944#M70735</link>
    <description>&lt;P&gt;raw looks like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{sector=sys code=xyz0 value=item,number name=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried creating new field and splitting value it worked on search string , but want to apply in props &lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
EXTRACT-test= value\={?P&amp;lt;&amp;gt;.+?}\sname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Created new field, field looks like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Value=item,number
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But we are looking in two different lines in same filed &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;value=item
            number
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By above code i can extract a new filed but i also want to split .&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jun 2019 07:27:18 GMT</pubDate>
    <dc:creator>nithinsplunk</dc:creator>
    <dc:date>2019-06-03T07:27:18Z</dc:date>
    <item>
      <title>How to split field in props.conf using EVAL?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-field-in-props-conf-using-EVAL/m-p/396944#M70735</link>
      <description>&lt;P&gt;raw looks like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{sector=sys code=xyz0 value=item,number name=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried creating new field and splitting value it worked on search string , but want to apply in props &lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
EXTRACT-test= value\={?P&amp;lt;&amp;gt;.+?}\sname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Created new field, field looks like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Value=item,number
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But we are looking in two different lines in same filed &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;value=item
            number
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By above code i can extract a new filed but i also want to split .&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 07:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-field-in-props-conf-using-EVAL/m-p/396944#M70735</guid>
      <dc:creator>nithinsplunk</dc:creator>
      <dc:date>2019-06-03T07:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to split field in props.conf using EVAL?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-field-in-props-conf-using-EVAL/m-p/396945#M70736</link>
      <description>&lt;P&gt;Not entirely clear what end result you are after. Do you want to extract the item and number parts into separate fields?&lt;/P&gt;

&lt;P&gt;If so, just extract it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
EXTRACT-test= value\=(?&amp;lt;item&amp;gt;[^,]+),(?&amp;lt;number.+?)\sname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you also need the combined value=item,number field extracted, you can do an EVAL to glue the 2 pieces together again:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-value = item.",".number
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively, you can also do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
EXTRACT-test01= value\=(?&amp;lt;value&amp;gt;.+?)\sname
EXTRACT-test02= (?&amp;lt;item&amp;gt;[^,]+),(?&amp;lt;number.+) in value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I misunderstood your question, please explain what exactly you want to achieve.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 13:23:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-field-in-props-conf-using-EVAL/m-p/396945#M70736</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-03T13:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to split field in props.conf using EVAL?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-field-in-props-conf-using-EVAL/m-p/396946#M70737</link>
      <description>&lt;P&gt;Hi @nithinsplunk,&lt;/P&gt;

&lt;P&gt;Try if this works for you. Below configuration will extract all fields like sector, code, value, etc. (&lt;STRONG&gt;=&lt;/STRONG&gt; separated)&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
REPORT-extract_fields = extract_fields_tr
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_fields_tr]
REGEX  = ([^=\s{]*)=([^\s}]*)
FORMAT = $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps!!  If for any events fields are not getting extracted, please comment full _raw event.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 14:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-field-in-props-conf-using-EVAL/m-p/396946#M70737</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-06-03T14:37:07Z</dc:date>
    </item>
  </channel>
</rss>

