<?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 Line breaks and regex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36020#M7958</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am having issues when Splunk is reading an XML file. I need Splunk to know that a transaction starts with &lt;DIARY_ENTRY&gt; and finishes with &lt;/DIARY_ENTRY&gt;, instead of line breaks all over the place.&lt;/P&gt;

&lt;P&gt;I'm not sure what the regex I need for this is? and would I need to add it to props.conf or transforms.conf or something else?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;diary_entry&amp;gt;
  &amp;lt;id&amp;gt;560494&amp;lt;/id&amp;gt;
  &amp;lt;entry_time&amp;gt;2011-08-25 12:36:00 UTC&amp;lt;/entry_time&amp;gt;
  &amp;lt;blood_glucose&amp;gt;15.4&amp;lt;/blood_glucose&amp;gt;
  &amp;lt;carbohydrate_portions&amp;gt;5&amp;lt;/carbohydrate_portions&amp;gt;
  &amp;lt;quick_insulin&amp;gt;3&amp;lt;/quick_insulin&amp;gt;
  &amp;lt;background_insulin&amp;gt;&amp;lt;/background_insulin&amp;gt;
  &amp;lt;ratio&amp;gt;1:1&amp;lt;/ratio&amp;gt;
  &amp;lt;entry_type&amp;gt;CORR&amp;lt;/entry_type&amp;gt;
  &amp;lt;target_min_bg&amp;gt;4.5&amp;lt;/target_min_bg&amp;gt;
  &amp;lt;target_max_bg&amp;gt;7.5&amp;lt;/target_max_bg&amp;gt;
  &amp;lt;ketones&amp;gt;&amp;lt;/ketones&amp;gt;
  &amp;lt;comments&amp;gt;&amp;lt;/comments&amp;gt;
  &amp;lt;injection_site&amp;gt;Stomach&amp;lt;/injection_site&amp;gt;
  &amp;lt;updated_at&amp;gt;2011-08-25 22:44:02 UTC&amp;lt;/updated_at&amp;gt;
&amp;lt;/diary_entry&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Aug 2012 19:36:15 GMT</pubDate>
    <dc:creator>j666gak</dc:creator>
    <dc:date>2012-08-15T19:36:15Z</dc:date>
    <item>
      <title>Line breaks and regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36020#M7958</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am having issues when Splunk is reading an XML file. I need Splunk to know that a transaction starts with &lt;DIARY_ENTRY&gt; and finishes with &lt;/DIARY_ENTRY&gt;, instead of line breaks all over the place.&lt;/P&gt;

&lt;P&gt;I'm not sure what the regex I need for this is? and would I need to add it to props.conf or transforms.conf or something else?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;diary_entry&amp;gt;
  &amp;lt;id&amp;gt;560494&amp;lt;/id&amp;gt;
  &amp;lt;entry_time&amp;gt;2011-08-25 12:36:00 UTC&amp;lt;/entry_time&amp;gt;
  &amp;lt;blood_glucose&amp;gt;15.4&amp;lt;/blood_glucose&amp;gt;
  &amp;lt;carbohydrate_portions&amp;gt;5&amp;lt;/carbohydrate_portions&amp;gt;
  &amp;lt;quick_insulin&amp;gt;3&amp;lt;/quick_insulin&amp;gt;
  &amp;lt;background_insulin&amp;gt;&amp;lt;/background_insulin&amp;gt;
  &amp;lt;ratio&amp;gt;1:1&amp;lt;/ratio&amp;gt;
  &amp;lt;entry_type&amp;gt;CORR&amp;lt;/entry_type&amp;gt;
  &amp;lt;target_min_bg&amp;gt;4.5&amp;lt;/target_min_bg&amp;gt;
  &amp;lt;target_max_bg&amp;gt;7.5&amp;lt;/target_max_bg&amp;gt;
  &amp;lt;ketones&amp;gt;&amp;lt;/ketones&amp;gt;
  &amp;lt;comments&amp;gt;&amp;lt;/comments&amp;gt;
  &amp;lt;injection_site&amp;gt;Stomach&amp;lt;/injection_site&amp;gt;
  &amp;lt;updated_at&amp;gt;2011-08-25 22:44:02 UTC&amp;lt;/updated_at&amp;gt;
&amp;lt;/diary_entry&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Aug 2012 19:36:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36020#M7958</guid>
      <dc:creator>j666gak</dc:creator>
      <dc:date>2012-08-15T19:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaks and regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36021#M7959</link>
      <description>&lt;P&gt;You need to add it as a &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; directive in &lt;CODE&gt;props.conf&lt;/CODE&gt;. Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
LINE_BREAKER = ([\r\n]+)&amp;lt;diary_entry&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Aug 2012 19:39:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36021#M7959</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-08-15T19:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaks and regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36022#M7960</link>
      <description>&lt;P&gt;and don't forget to also set &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;SHOULD_LINEMERGE=false&lt;BR /&gt;
TIME_PREFIX=&lt;ENTRY_TIME&gt;&lt;/ENTRY_TIME&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;note that the latter may not be required if your timestamps are parsed correctly without it.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:16:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36022#M7960</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T12:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaks and regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36023#M7961</link>
      <description>&lt;P&gt;just trying it now and testing&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 20:22:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36023#M7961</guid>
      <dc:creator>j666gak</dc:creator>
      <dc:date>2012-08-15T20:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaks and regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36024#M7962</link>
      <description>&lt;P&gt;I have edited the props.conf and restarted the Splunk server but nothing has changed. Does the data need to be re-indexed?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 20:32:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36024#M7962</guid>
      <dc:creator>j666gak</dc:creator>
      <dc:date>2012-08-15T20:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaks and regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36025#M7963</link>
      <description>&lt;P&gt;Already indexed data will not be altered by this operation. Any new data coming in should be broken into separate event according to your config.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 20:35:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-breaks-and-regex-help/m-p/36025#M7963</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-08-15T20:35:51Z</dc:date>
    </item>
  </channel>
</rss>

