<?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: remove unwanted character at end of a string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/remove-unwanted-character-at-end-of-a-string/m-p/379596#M91373</link>
    <description>&lt;P&gt;Is it always xx-XXX? If so, could you substring out that portion and 'leave behind' the character?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;my_char = substr(old_char, 1, 6);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 26 Jul 2017 22:38:40 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-07-26T22:38:40Z</dc:date>
    <item>
      <title>remove unwanted character at end of a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-unwanted-character-at-end-of-a-string/m-p/379591#M91371</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a variable: Report_Num&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Character values should be xx-xxx (e.g 07-041)&amp;nbsp; BUT some values have an extra character at the end (eg. 07-055D).&lt;/P&gt;
&lt;P&gt;Is there a way to strip off that last character for some of these values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 22:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-unwanted-character-at-end-of-a-string/m-p/379591#M91371</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2017-07-26T22:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: remove unwanted character at end of a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-unwanted-character-at-end-of-a-string/m-p/379595#M91372</link>
      <description>&lt;P&gt;Is there a rule we can use to identify the errant value? Does the character value actually contain ")" or were you just setting that off as example?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe a rule such as the character&amp;nbsp;at the end&amp;nbsp;must be a numeral or in some other list of characters?&lt;/P&gt;
&lt;P&gt;Or the overall lenght of the variable has a specific length. The length of 07-055D would be 7 so you might use in a data step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Value = substr(value,1,6); which would strip of anything past the sixth character.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 22:38:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-unwanted-character-at-end-of-a-string/m-p/379595#M91372</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-07-26T22:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: remove unwanted character at end of a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-unwanted-character-at-end-of-a-string/m-p/379596#M91373</link>
      <description>&lt;P&gt;Is it always xx-XXX? If so, could you substring out that portion and 'leave behind' the character?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;my_char = substr(old_char, 1, 6);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jul 2017 22:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-unwanted-character-at-end-of-a-string/m-p/379596#M91373</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-26T22:38:40Z</dc:date>
    </item>
  </channel>
</rss>

