<?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 Number from a character variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Extract-Number-from-a-character-variable/m-p/315670#M68892</link>
    <description>&lt;P&gt;Worked! Thanks!!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Nov 2016 20:22:10 GMT</pubDate>
    <dc:creator>Nadra999</dc:creator>
    <dc:date>2016-11-30T20:22:10Z</dc:date>
    <item>
      <title>Extract Number from a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-Number-from-a-character-variable/m-p/315660#M68887</link>
      <description>&lt;P&gt;I imported data from CSV files and one of the variables is character (should be numeric).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variables has numbers like "1000" and "2000" but some look like "1000..." or "2000...." - they have there extra "..." that vary in lenght at the end. How can I extract just the numbers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nadra&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 20:04:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-Number-from-a-character-variable/m-p/315660#M68887</guid>
      <dc:creator>Nadra999</dc:creator>
      <dc:date>2016-11-30T20:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Number from a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-Number-from-a-character-variable/m-p/315668#M68891</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;num_val = input(compress(char_val,,'kd'),best32.);
&lt;/PRE&gt;
&lt;P&gt;Now, I assume you have only positive integer here. &amp;nbsp;If decimal or negative are possible, then you may need much more complicated code to deal with that possibility (as you have . and such in your examples and can't just keep all . )...&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 20:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-Number-from-a-character-variable/m-p/315668#M68891</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2016-11-30T20:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Number from a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-Number-from-a-character-variable/m-p/315670#M68892</link>
      <description>&lt;P&gt;Worked! Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 20:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-Number-from-a-character-variable/m-p/315670#M68892</guid>
      <dc:creator>Nadra999</dc:creator>
      <dc:date>2016-11-30T20:22:10Z</dc:date>
    </item>
  </channel>
</rss>

