<?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 Trim numeric values after last letter in a string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Trim-numeric-values-after-last-letter-in-a-string/m-p/687640#M208772</link>
    <description>Works perfectly! Thank you!</description>
    <pubDate>Tue, 29 Sep 2020 19:29:10 GMT</pubDate>
    <dc:creator>BlayLay</dc:creator>
    <dc:date>2020-09-29T19:29:10Z</dc:date>
    <item>
      <title>How to Trim numeric values after last letter in a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Trim-numeric-values-after-last-letter-in-a-string/m-p/687602#M208758</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a SAS dataset, with a column we can call SerialCurrent for this exercise. There are several hundred unique serial numbers within the column, all with varying lengths (trim based on # of positions isn't an option, nor by unique character). Each record is a string that varies in letters used and length. What I'm trying to do is to eliminate ALL numbers after the LAST letter in each string. Example below shows what is currently showing and I've added a second column for you to see what I'm trying to get to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SerialCurrent&lt;/TD&gt;&lt;TD&gt;SerialNew&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A00589F123456&lt;/TD&gt;&lt;TD&gt;A00589F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BT10346T145326&lt;/TD&gt;&lt;TD&gt;BT10346T&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AK00H20078354&lt;/TD&gt;&lt;TD&gt;AK00H&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LM01T234578&lt;/TD&gt;&lt;TD&gt;LM01T&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any and all help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Trim-numeric-values-after-last-letter-in-a-string/m-p/687602#M208758</guid>
      <dc:creator>BlayLay</dc:creator>
      <dc:date>2020-09-29T17:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim numeric values after last letter in a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Trim-numeric-values-after-last-letter-in-a-string/m-p/687612#M208763</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input SerialCurrent :$30.	;*SerialNew;
cards;
A00589F123456	A00589F
BT10346T145326	BT10346T
AK00H20078354	AK00H
LM01T234578	LM01T
;

data want;
 set have;
 SerialNew=substr(serialcurrent,1,notdigit(strip(serialcurrent),-99));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:59:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Trim-numeric-values-after-last-letter-in-a-string/m-p/687612#M208763</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-09-29T17:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim numeric values after last letter in a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Trim-numeric-values-after-last-letter-in-a-string/m-p/687640#M208772</link>
      <description>Works perfectly! Thank you!</description>
      <pubDate>Tue, 29 Sep 2020 19:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Trim-numeric-values-after-last-letter-in-a-string/m-p/687640#M208772</guid>
      <dc:creator>BlayLay</dc:creator>
      <dc:date>2020-09-29T19:29:10Z</dc:date>
    </item>
  </channel>
</rss>

