<?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: Line_Breaker question in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/574791#M101585</link>
    <description>&lt;P&gt;Thank you - this was exactly what I was trying to figure out.&amp;nbsp; I had a regex and couldn't figure out why only part of it was disappearing.&amp;nbsp; I didn't understand about the capture group.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Nov 2021 22:04:11 GMT</pubDate>
    <dc:creator>m2oswald</dc:creator>
    <dc:date>2021-11-12T22:04:11Z</dc:date>
    <item>
      <title>Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60653#M12047</link>
      <description>&lt;P&gt;[operlog]&lt;/P&gt;

&lt;P&gt;LINE_BREAKER = (?m)(.&lt;EM&gt;\d{7}.&lt;/EM&gt;\d\d:\d\d:\d\d.\d\d)&lt;/P&gt;

&lt;P&gt;SHOULD_LINEMERGE = false&lt;/P&gt;

&lt;P&gt;Why do my events have the text that I specified in my line_breaker removed?&lt;/P&gt;

&lt;P&gt;Are my parens wrong?  Should I add a different command?&lt;/P&gt;

&lt;P&gt;In a nutshell I want my line break to happen when the weird date format shows up.  But I want the date format to be in the event.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
  Paul&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 04:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60653#M12047</guid>
      <dc:creator>PaulEscher</dc:creator>
      <dc:date>2011-08-19T04:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60654#M12048</link>
      <description>&lt;P&gt;One way to think about this is: LINE_BREAKER "defines" the line-break characters.  The "line breaks" (defined by the regex capture group) are removed.  This is the correct behavior for the LINE_BREAKER.  See the Splunk docs on &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Indexmulti-lineevents"&gt;line breaking&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I think that you probably want BREAK_ONLY_BEFORE&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; BREAK_ONLY_BEFORE = (.\d{7}.\d\d:\d\d:\d\d.\d\d)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or maybe MUST_BREAK_AFTER&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 05:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60654#M12048</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2011-08-19T05:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60655#M12049</link>
      <description>&lt;P&gt;the 'd' for digit does not seem correct to me, try '\d'&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 15:37:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60655#M12049</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2011-08-19T15:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60656#M12050</link>
      <description>&lt;P&gt;when I posted it there was a slash before the d, so try '\d'&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 16:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60656#M12050</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2011-08-19T16:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60657#M12051</link>
      <description>&lt;P&gt;Paul, note that the backslashes before the "d"s were removed.  The text formatting is a bit messed up unfortunately.  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;  The suggestion here is right on!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 18:38:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60657#M12051</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2011-08-19T18:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60658#M12052</link>
      <description>&lt;P&gt;Thanks Lowell - I have edited my answer to correct the missing backslashes!&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2011 15:56:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60658#M12052</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2011-08-21T15:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60659#M12053</link>
      <description>&lt;P&gt;Thanks lguinn!  I didn't see the relationship to the \r\n and the removal of them to create an event.  Once I saw that the MUST_BREAK_AFTER made perfect sense.&lt;/P&gt;

&lt;P&gt;Thanks again.&lt;BR /&gt;
  Paul&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:49:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60659#M12053</guid>
      <dc:creator>PaulEscher</dc:creator>
      <dc:date>2020-09-28T09:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60660#M12054</link>
      <description>&lt;P&gt;When using &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; you have a regular expression in up to three parts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = the previous event end (the data between events) the new event here
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That is to say only the part in the capturing group is removed. So to break only on newlines followed by digits as per your pattern:&lt;BR /&gt;
    LINE_BREAKER = ([\r\n]+).\d{7}.\d\d:\d\d:\d\d.\d\d&lt;/P&gt;

&lt;P&gt;This seems to cause some confusion, but using &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; (with &lt;CODE&gt;SHOULD_LINEMERGE = false&lt;/CODE&gt;) is my preferred method as it only requires remembering one thing, and covers most cases in a quick and simple way.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jan 2012 23:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60660#M12054</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2012-01-01T23:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60661#M12055</link>
      <description>&lt;P&gt;LINE_BREAKER is the preferred method. Please see Mike's post below.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 18:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60661#M12055</guid>
      <dc:creator>msettipane</dc:creator>
      <dc:date>2013-11-20T18:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60662#M12056</link>
      <description>&lt;P&gt;You are right that Mike's comment is correct and I was unclear. The capture portion of the regular expression is the only part that is removed when you use &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Perhaps &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; is preferred for people who know regular expressions. In my experience, the number of people who can write a proper &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; regular expression is quite small. The manual actually says that &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; "might increase your indexing speed, but is somewhat more difficult to work with."&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2013 22:53:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60662#M12056</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-11-21T22:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60663#M12057</link>
      <description>&lt;P&gt;Further, &lt;CODE&gt;BREAK_ONLY_BEFORE&lt;/CODE&gt; (and &lt;CODE&gt;MUST_BREAK_AFTER&lt;/CODE&gt;) only require that you supply a string that uniquely appears in the first line (or last line) of the event - the regular expression is unanchored.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; requires a regular expression that is anchored both at the end of the last event line and the beginning of the first event line.&lt;/P&gt;

&lt;P&gt;It may be faster to use &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt;, but what good is that if the regular expression is wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2013 22:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/60663#M12057</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-11-21T22:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Line_Breaker question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/574791#M101585</link>
      <description>&lt;P&gt;Thank you - this was exactly what I was trying to figure out.&amp;nbsp; I had a regex and couldn't figure out why only part of it was disappearing.&amp;nbsp; I didn't understand about the capture group.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 22:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-Breaker-question/m-p/574791#M101585</guid>
      <dc:creator>m2oswald</dc:creator>
      <dc:date>2021-11-12T22:04:11Z</dc:date>
    </item>
  </channel>
</rss>

