<?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: error on field extraction using regex !! in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/error-on-field-extraction-using-regex/m-p/76104#M19245</link>
    <description>&lt;P&gt;You should consider splitting this up into separate regex for each field instead of one huge regex containing all matches. Could you paste some actual events that you want to match on?&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jun 2012 05:16:27 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-06-15T05:16:27Z</dc:date>
    <item>
      <title>error on field extraction using regex !!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/error-on-field-extraction-using-regex/m-p/76103#M19244</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;i am trying to use regex to extract field.. and i facing some problem when it has null value on the field.. i will give example on the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;field1      field2           field3
AAAAA       BBBBB            CCCCC
DDDDD                        EEEEE
FFFFF                        
GGGGG       HHHHH 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i use regex in my transform.conf as follow&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[transform-impressio]
REGEX = (.{5})(.{12})(.{17})
FORMAT = field1::"$1" field2::"$2 field3::"$3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically this regex does for everything from the first 5 character belong to field1 and next 12 belong to field 2 and next 17 belong to field 3 &lt;/P&gt;

&lt;P&gt;However, when i search on splunk it return me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;field1     field 2      field 3
AAAAA      BBBBB        CCCCC
DDDDD                   EEEEE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;it missing the another 2 row&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;And i understand it is because that if it has empty space on last field then this regex couldn't work!!.. &lt;BR /&gt;
anyone has good suggestion on it?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2012 03:21:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/error-on-field-extraction-using-regex/m-p/76103#M19244</guid>
      <dc:creator>sg5258</dc:creator>
      <dc:date>2012-06-15T03:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: error on field extraction using regex !!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/error-on-field-extraction-using-regex/m-p/76104#M19245</link>
      <description>&lt;P&gt;You should consider splitting this up into separate regex for each field instead of one huge regex containing all matches. Could you paste some actual events that you want to match on?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2012 05:16:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/error-on-field-extraction-using-regex/m-p/76104#M19245</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-06-15T05:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: error on field extraction using regex !!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/error-on-field-extraction-using-regex/m-p/76105#M19246</link>
      <description>&lt;P&gt;As Ayn said, always post sample events in order to get any decent help on regex questions. Also, there seems to be some unbalanced double-quotes in your &lt;CODE&gt;FORMAT =&lt;/CODE&gt;. Not sure you need quotes at all.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2012 08:10:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/error-on-field-extraction-using-regex/m-p/76105#M19246</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-06-15T08:10:40Z</dc:date>
    </item>
  </channel>
</rss>

