<?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: do we have commad to trim new lines ?? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36384#M178548</link>
    <description>&lt;P&gt;I'm pretty sure you can't match on anchors like that in regex. You'd need to match against the actual characters, like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=Field mode=sed "s/[\r\n]//g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 20 Feb 2013 09:01:37 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2013-02-20T09:01:37Z</dc:date>
    <item>
      <title>do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36377#M178541</link>
      <description>&lt;P&gt;HI..&lt;/P&gt;

&lt;P&gt;I have seen the functions ltrim and rtrim to spaces ..do we have functions to trim new lines..&lt;/P&gt;

&lt;P&gt;actually in my fields i am getting data like this..&lt;/P&gt;

&lt;P&gt;Field&lt;/P&gt;

&lt;P&gt;data&lt;/P&gt;

&lt;P&gt;so when i use table command to display...&lt;/P&gt;

&lt;P&gt;sourcetype="mydata" | table Field&lt;/P&gt;

&lt;P&gt;its displaying like this  &lt;/P&gt;

&lt;P&gt;Field&lt;BR /&gt;
data&lt;/P&gt;

&lt;P&gt;but when i extract it to a csv file ..those empty line spaces are coming...tried coaselce function also.but no luck...&lt;/P&gt;

&lt;P&gt;pls help&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 10:00:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36377#M178541</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-02-19T10:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36378#M178542</link>
      <description>&lt;P&gt;Replace should be able to do this, with an expression like this: "[\n\r]+$"&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 10:16:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36378#M178542</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-19T10:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36379#M178543</link>
      <description>&lt;P&gt;...or rex mode=sed. I think replace only replaces once.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 10:18:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36379#M178543</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-02-19T10:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36380#M178544</link>
      <description>&lt;P&gt;Once should be enough, there's no point in removing trailing newlines again after the first eval.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 10:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36380#M178544</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-19T10:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36381#M178545</link>
      <description>&lt;P&gt;i have used replace function like this ..&lt;/P&gt;

&lt;P&gt;eval Field = replace(Field,"[\n\r]+$","") .. but this didnt work ..&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 11:30:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36381#M178545</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-02-19T11:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36382#M178546</link>
      <description>&lt;P&gt;Works well over here. Make sure there aren't any spaces or other characters after the newlines, else the expression will not match.&lt;/P&gt;

&lt;P&gt;As a test, consider removing the dollar sign - that should remove every newline from your field, even non-trailing ones.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 11:55:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36382#M178546</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-19T11:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36383#M178547</link>
      <description>&lt;P&gt;even sed command is not working ...&lt;/P&gt;

&lt;P&gt;rex field=Field mode=sed "s/^$//" &lt;/P&gt;

&lt;P&gt;pls help&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 08:19:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36383#M178547</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-02-20T08:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36384#M178548</link>
      <description>&lt;P&gt;I'm pretty sure you can't match on anchors like that in regex. You'd need to match against the actual characters, like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=Field mode=sed "s/[\r\n]//g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Feb 2013 09:01:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36384#M178548</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-02-20T09:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: do we have commad to trim new lines ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36385#M178549</link>
      <description>&lt;P&gt;Thanx a lot Ayn ..sed is working now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 14:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/do-we-have-commad-to-trim-new-lines/m-p/36385#M178549</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-02-20T14:31:13Z</dc:date>
    </item>
  </channel>
</rss>

