<?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: Why exporting an event to a file removes carriage return characters (0x0D)? in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279484#M5302</link>
    <description>&lt;P&gt;That didn't work. In that example mentioned in the link he was trying to remove those characters. I'm trying NOT to remove, but to keep the characters.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2016 07:59:27 GMT</pubDate>
    <dc:creator>hannus</dc:creator>
    <dc:date>2016-09-19T07:59:27Z</dc:date>
    <item>
      <title>Why exporting an event to a file removes carriage return characters (0x0D)?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279480#M5298</link>
      <description>&lt;P&gt;When I import some text with carriage return and line feed characters, I'm able to get data indexed in correct format. But when I export that same data, I get the following effect:&lt;/P&gt;

&lt;P&gt;CR -&amp;gt; CR (ok)&lt;BR /&gt;
LF -&amp;gt; LF (ok)&lt;BR /&gt;
LF+CR -&amp;gt; LF+CR (ok) but&lt;BR /&gt;
CR+LF -&amp;gt; LF (fail)&lt;/P&gt;

&lt;P&gt;Why does Splunk remove the CR in CR+LF during export?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 12:11:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279480#M5298</guid>
      <dc:creator>hannus</dc:creator>
      <dc:date>2016-09-16T12:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why exporting an event to a file removes carriage return characters (0x0D)?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279481#M5299</link>
      <description>&lt;P&gt;Have you tried exporting via rest?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2016 17:50:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279481#M5299</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-09-18T17:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why exporting an event to a file removes carriage return characters (0x0D)?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279482#M5300</link>
      <description>&lt;P&gt;A similar issue at &lt;A href="https://answers.splunk.com/answers/212194/why-are-new-events-resulting-from-mvexpand-picking.html"&gt;Why are new events resulting from mvexpand picking up special characters when exporting to CSV and how to avoid this?&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Solved via - &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1842iE306FD10DAFFA9AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2016 20:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279482#M5300</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-09-18T20:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why exporting an event to a file removes carriage return characters (0x0D)?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279483#M5301</link>
      <description>&lt;P&gt;So maybe try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | fields _raw | table _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Sep 2016 01:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279483#M5301</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-09-19T01:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why exporting an event to a file removes carriage return characters (0x0D)?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279484#M5302</link>
      <description>&lt;P&gt;That didn't work. In that example mentioned in the link he was trying to remove those characters. I'm trying NOT to remove, but to keep the characters.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 07:59:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279484#M5302</guid>
      <dc:creator>hannus</dc:creator>
      <dc:date>2016-09-19T07:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why exporting an event to a file removes carriage return characters (0x0D)?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279485#M5303</link>
      <description>&lt;P&gt;No, not quite yet. I expect it not to work. But I will test it after learning how to do that...&lt;/P&gt;

&lt;P&gt;I'm working on a workaround. With that I'm quite close but I don't know if this can be actually done. My idea is to replace all CRLF's with CRCRLF in the search so the export would come out correct.&lt;BR /&gt;
I have tested this by importing data in Splunk with "wrong" format, like CRCRLF. When I export this it comes out CRLF. Nice, this kind of works.&lt;BR /&gt;
Now I'm trying to figure out how I can get the REX MODE=SED to work but I just don't know how to replace the "\r" and "\n" correctly. Simple "\r\r\n" won't work.&lt;/P&gt;

&lt;P&gt;My search command:&lt;BR /&gt;
index=test | REX mode=SED "s/\r\n/?????/g"&lt;BR /&gt;
The first part (\r\n) works, it finds the CRLF's. But I just don't know how to format the ????? part.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 08:02:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279485#M5303</guid>
      <dc:creator>hannus</dc:creator>
      <dc:date>2016-09-19T08:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why exporting an event to a file removes carriage return characters (0x0D)?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279486#M5304</link>
      <description>&lt;P&gt;CR = \r  LF = \n&lt;/P&gt;

&lt;P&gt;sometimes \R is the similar to \r but i believe its shorthand for (\r OR \n OR \r\n)&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 12:03:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-exporting-an-event-to-a-file-removes-carriage-return/m-p/279486#M5304</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-09-19T12:03:57Z</dc:date>
    </item>
  </channel>
</rss>

