<?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 Removing newline and carriage return in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Removing-newline-and-carriage-return/m-p/521348#M88097</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to splunk. I am trying to make my logging message format good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have log message with newline or carriage return not sure which one but when I try to replace it using&amp;nbsp;&lt;/P&gt;&lt;P&gt;rex field=message mode=sed "s/^[\r\n]+//g" it does not work, Any suggestions? I am not sure if there are any spaces or white spaces but I also tried with&amp;nbsp;s/^/S*[\r\n]+//g&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Message:&lt;/P&gt;&lt;P&gt;Line1&lt;/P&gt;&lt;P&gt;Line2&lt;/P&gt;&lt;P&gt;Line3&lt;/P&gt;&lt;P&gt;Expected :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Line1&lt;BR /&gt;Line2&lt;BR /&gt;Line3&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 18:40:33 GMT</pubDate>
    <dc:creator>avanijjain16</dc:creator>
    <dc:date>2020-09-24T18:40:33Z</dc:date>
    <item>
      <title>Removing newline and carriage return</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Removing-newline-and-carriage-return/m-p/521348#M88097</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to splunk. I am trying to make my logging message format good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have log message with newline or carriage return not sure which one but when I try to replace it using&amp;nbsp;&lt;/P&gt;&lt;P&gt;rex field=message mode=sed "s/^[\r\n]+//g" it does not work, Any suggestions? I am not sure if there are any spaces or white spaces but I also tried with&amp;nbsp;s/^/S*[\r\n]+//g&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Message:&lt;/P&gt;&lt;P&gt;Line1&lt;/P&gt;&lt;P&gt;Line2&lt;/P&gt;&lt;P&gt;Line3&lt;/P&gt;&lt;P&gt;Expected :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Line1&lt;BR /&gt;Line2&lt;BR /&gt;Line3&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 18:40:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Removing-newline-and-carriage-return/m-p/521348#M88097</guid>
      <dc:creator>avanijjain16</dc:creator>
      <dc:date>2020-09-24T18:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Removing newline and carriage return</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Removing-newline-and-carriage-return/m-p/521357#M88098</link>
      <description>&lt;P&gt;Your sed matches to [\r\n] at the beginning of the field - could it be at the end? Also, are these 3 instance of the message field or multi-line with the same message instance?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 19:00:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Removing-newline-and-carriage-return/m-p/521357#M88098</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-24T19:00:10Z</dc:date>
    </item>
  </channel>
</rss>

