<?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: Extract just number part from alphanumeric string in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836140#M330619</link>
    <description>&lt;P&gt;Ballardw,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This is just dummy data that I created. The real production data is messy. I just observed some pattern and posted it. I do need to extract the starting numerical digit (along with any letters are there in between) and ending numerical digit. How could I get it? I could get the starting numerical value for all the values, but to get the entrire string till the last number digit is the real challenge. Could someone help me in that please?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2022 16:29:56 GMT</pubDate>
    <dc:creator>buddha_d</dc:creator>
    <dc:date>2022-09-30T16:29:56Z</dc:date>
    <item>
      <title>Extract just number part from alphanumeric string in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836085#M330598</link>
      <description>&lt;P&gt;Hi SAS community,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I have this scenario, where I need to extract account numbers from a string and it is messy and need help to fix it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input accountnumber $50.;&lt;BR /&gt;cards;&lt;BR /&gt;pcg1234500008765CheckingPCG000006878siim&lt;BR /&gt;OAK000000345697000000CHECK&lt;BR /&gt;MMTAYL8202206ERRA23124999GIG&lt;BR /&gt;YYY2356543ach78Y34????&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;U&gt;WANT&lt;/U&gt;&lt;BR /&gt;1234500008765CheckingPCG000006878&lt;BR /&gt;000000345697000000&lt;BR /&gt;8202206ERRA23124999&lt;BR /&gt;2356543ach78Y34&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use anydigit and substring function to start the right number, but I can't finish how to substring to get to the last digit?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 14:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836085#M330598</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2022-09-30T14:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extract just number part from alphanumeric string in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836120#M330609</link>
      <description>The data you want still has letters in it--is there a systematic approach to the letters you are trying to keep? The COMPRESS() function has a handy 3rd argument for determining which kinds of characters to keep, but I'm not sure if it applies in this case.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_031/fedsqlref/n01p24mgwawxa2n1hy4gwe5t59xf.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_031/fedsqlref/n01p24mgwawxa2n1hy4gwe5t59xf.htm&lt;/A&gt;</description>
      <pubDate>Fri, 30 Sep 2022 15:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836120#M330609</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2022-09-30T15:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Extract just number part from alphanumeric string in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836133#M330614</link>
      <description>&lt;P&gt;Rules for why in&lt;/P&gt;
&lt;P&gt;pcg1234500008765CheckingPCG000006878siim&lt;/P&gt;
&lt;P&gt;you remove the first pcg but keep the second PCG are going to complicate this a lot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any documentation about the components of that obnoxious string from the source?&lt;/P&gt;
&lt;P&gt;That you can share?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 16:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836133#M330614</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-09-30T16:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract just number part from alphanumeric string in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836139#M330618</link>
      <description>&lt;P&gt;I can't use the compress function as it eliminates even the letters in between account number. some account numbers are masked with letters for security reasons. So, this might not be an option.&lt;BR /&gt;Thanks for responding.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 16:26:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836139#M330618</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2022-09-30T16:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract just number part from alphanumeric string in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836140#M330619</link>
      <description>&lt;P&gt;Ballardw,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This is just dummy data that I created. The real production data is messy. I just observed some pattern and posted it. I do need to extract the starting numerical digit (along with any letters are there in between) and ending numerical digit. How could I get it? I could get the starting numerical value for all the values, but to get the entrire string till the last number digit is the real challenge. Could someone help me in that please?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 16:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-just-number-part-from-alphanumeric-string-in-SAS/m-p/836140#M330619</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2022-09-30T16:29:56Z</dc:date>
    </item>
  </channel>
</rss>

