<?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: Need help on rtrim command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517959#M145681</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/88608"&gt;@nnimbe1&lt;/a&gt;&amp;nbsp;You can try the below search. The reason rtrim is working only for few is that you need to specify complete string that needs to be truncated from right. You can either use the rex command or use split and mvindex to get the desired result&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=linux host=*  source=ps sapstasrtsrv| eval temp=split(ARGS,"_-d")|eval ARGS=mvindex(temp,0)&lt;/LI-CODE&gt;&lt;P&gt;. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Sep 2020 18:56:02 GMT</pubDate>
    <dc:creator>vijetagalani</dc:creator>
    <dc:date>2020-09-04T18:56:02Z</dc:date>
    <item>
      <title>Need help on rtrim command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517927#M145663</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am using rtrim command to trim some values, but its not working for all the values,as per below screenshot i need to trim everything from _-D in all values, its working for first one for remaining values its not working, can anyone please provide some solution to it. Or in case of any regex please suggest&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sap process error.JPG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10653i4A4BA36523E3DECB/image-size/large?v=v2&amp;amp;px=999" role="button" title="sap process error.JPG" alt="sap process error.JPG" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;sap process error.JPG&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 15:14:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517927#M145663</guid>
      <dc:creator>nnimbe1</dc:creator>
      <dc:date>2020-09-04T15:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rtrim command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517929#M145665</link>
      <description>&lt;LI-CODE lang="markup"&gt;...
| rex field=ARGS "(?&amp;lt;ARGS&amp;gt;.*)_-D"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Sep 2020 15:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517929#M145665</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-04T15:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rtrim command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517959#M145681</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/88608"&gt;@nnimbe1&lt;/a&gt;&amp;nbsp;You can try the below search. The reason rtrim is working only for few is that you need to specify complete string that needs to be truncated from right. You can either use the rex command or use split and mvindex to get the desired result&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=linux host=*  source=ps sapstasrtsrv| eval temp=split(ARGS,"_-d")|eval ARGS=mvindex(temp,0)&lt;/LI-CODE&gt;&lt;P&gt;. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 18:56:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517959#M145681</guid>
      <dc:creator>vijetagalani</dc:creator>
      <dc:date>2020-09-04T18:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rtrim command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517961#M145683</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;rtrim&lt;/FONT&gt; command (and &lt;FONT face="courier new,courier"&gt;ltrim&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;trim&lt;/FONT&gt; as well) do not take regular expressions.&amp;nbsp; The second argument is a list of characters that will be removed.&amp;nbsp; In the example, four characters will be removed if present: underscore, hyphen, upper-case D, and asterisk.&lt;/P&gt;&lt;P&gt;To remove characters based on a regular expression, use &lt;FONT face="courier new,courier"&gt;rex mode=sed&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 19:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/517961#M145683</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-04T19:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rtrim command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/518238#M145745</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp; Thanks, but if you can help with rex expression using which if i can exclude everything from _&lt;SPAN&gt;&amp;nbsp;-D in all values then it will be helpful&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 14:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/518238#M145745</guid>
      <dc:creator>nnimbe1</dc:creator>
      <dc:date>2020-09-07T14:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rtrim command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/518240#M145746</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/37847"&gt;@vijetagalani&lt;/a&gt;&amp;nbsp;, thanks but unfortunately its not working, if you can help me with rex expression using which i can exclude everything from _-D in ARGS&amp;nbsp; field then it will be helpful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sap11.JPG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10685iA57E605BFAFB0CC1/image-size/large?v=v2&amp;amp;px=999" role="button" title="sap11.JPG" alt="sap11.JPG" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;sap11.JPG&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 14:04:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/518240#M145746</guid>
      <dc:creator>nnimbe1</dc:creator>
      <dc:date>2020-09-07T14:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rtrim command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/518242#M145747</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,thanks but unfortunately its not working, if you can help me with rex expression using which i can exclude everything from _-D in ARGS&amp;nbsp; field then it will be helpful&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sap12.JPG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10686i1EE7B5DEA3E8A845/image-size/large?v=v2&amp;amp;px=999" role="button" title="sap12.JPG" alt="sap12.JPG" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;sap12.JPG&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 14:05:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/518242#M145747</guid>
      <dc:creator>nnimbe1</dc:creator>
      <dc:date>2020-09-07T14:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on rtrim command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/518247#M145749</link>
      <description>&lt;P&gt;The fact that you are not getting any events has nothing to do with the rex, your base search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=linux host=* source=ps sapstasrtsrv&lt;/LI-CODE&gt;&lt;P&gt;is not returning any events for the 24 hour time period you specified. Fix this and reapply the rex&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 14:14:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-on-rtrim-command/m-p/518247#M145749</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-07T14:14:56Z</dc:date>
    </item>
  </channel>
</rss>

