<?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: How to remove the leading and trailing spaces of the indexedField? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538924#M4888</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;i had missed the quotes but after adding single quotes also i dont see the expected result even though i am not getting any error.&lt;/P&gt;&lt;P&gt;| eval TR#=trim('TR#')&lt;/P&gt;&lt;P&gt;I exported my panel data to see if the spaces are removed but still it is present as shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ashwini008_0-1612768656478.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12844i0C68FA606B337CFC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ashwini008_0-1612768656478.png" alt="Ashwini008_0-1612768656478.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2021 07:18:49 GMT</pubDate>
    <dc:creator>Ashwini008</dc:creator>
    <dc:date>2021-02-08T07:18:49Z</dc:date>
    <item>
      <title>How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538920#M4886</link>
      <description>&lt;P&gt;i want to remove the spaces of the leading and trailing of my field.&lt;/P&gt;&lt;P&gt;I am trying to use trim and below Rex both are not working for me.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;|eval NewField=trim(OldField)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| rex field=myField mode=sed "s/(^\s+)|(\s+$)//g"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EX:(dots is to show the space)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TR#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CR1K901395........&lt;BR /&gt;BT1K901394&lt;BR /&gt;CT2K901398&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;KMK901397.........&lt;BR /&gt;NHK901393&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;|eval TRIM=trim(TR#) this is throwing me an error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cant we use TRIM function to trim the whole field? any suggestions on how can i remove the spaces of the whole field?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 06:55:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538920#M4886</guid>
      <dc:creator>Ashwini008</dc:creator>
      <dc:date>2021-02-08T06:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538921#M4887</link>
      <description>&lt;P&gt;What is the error being thrown? Have you tried putting your field name in single quotes?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 07:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538921#M4887</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-08T07:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538924#M4888</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;i had missed the quotes but after adding single quotes also i dont see the expected result even though i am not getting any error.&lt;/P&gt;&lt;P&gt;| eval TR#=trim('TR#')&lt;/P&gt;&lt;P&gt;I exported my panel data to see if the spaces are removed but still it is present as shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ashwini008_0-1612768656478.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12844i0C68FA606B337CFC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ashwini008_0-1612768656478.png" alt="Ashwini008_0-1612768656478.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 07:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538924#M4888</guid>
      <dc:creator>Ashwini008</dc:creator>
      <dc:date>2021-02-08T07:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538930#M4889</link>
      <description>&lt;P&gt;It looks like from the graphic that you may have some extended ASCII characters trailing your values - is it these that you want to remove? You could try something like this (again you may need single quotes around the field name)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=myField mode=sed "s/[\u128-\u255]*$//g"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 07:52:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538930#M4889</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-08T07:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538936#M4890</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; when i search my indexed data it looks like below shown&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ashwini008_0-1612772287933.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12845i6606AF7523D6E9E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ashwini008_0-1612772287933.png" alt="Ashwini008_0-1612772287933.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when i export the same data from panel it looks like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ashwini008_1-1612772338567.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12846i4C3E02D149038B76/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ashwini008_1-1612772338567.png" alt="Ashwini008_1-1612772338567.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So i need to make sure when we export the data there are not such characters.&lt;/P&gt;&lt;P&gt;P.s the data indexed in splunk is from sharepoint portal where it is updated TR with trailing Spaces.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 08:23:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538936#M4890</guid>
      <dc:creator>Ashwini008</dc:creator>
      <dc:date>2021-02-08T08:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538942#M4891</link>
      <description>&lt;P&gt;Did you try the rex?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=myField mode=sed "s/[\u128-\u255]*$//g"&lt;/LI-CODE&gt;&lt;P&gt;You may need to do the trim as well beforehand and/or remove the $ from the end of the match string&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 08:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538942#M4891</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-08T08:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538952#M4892</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;Yes i tried but getting the below error.When i inspect no details found&lt;/P&gt;&lt;P&gt;The search job has failed due to an error. You may be able view the job in the job inspector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we use trim function for the FIELD or is it specific to values of the field?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 09:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538952#M4892</guid>
      <dc:creator>Ashwini008</dc:creator>
      <dc:date>2021-02-08T09:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538954#M4893</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=myField mode=sed "s/[\x80-\xff]*//g"&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Feb 2021 09:58:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538954#M4893</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-08T09:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the leading and trailing spaces of the indexedField?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538963#M4894</link>
      <description>&lt;P&gt;I dont see error now,but the trailing space isnt removed and the ASCII character is stillpresent when exported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| eval TR#=trim('TR#')&lt;BR /&gt;| rex field='TR#' mode=sed "s/[\x80-\xff]*//g"&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 10:36:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-remove-the-leading-and-trailing-spaces-of-the/m-p/538963#M4894</guid>
      <dc:creator>Ashwini008</dc:creator>
      <dc:date>2021-02-08T10:36:15Z</dc:date>
    </item>
  </channel>
</rss>

