<?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: take only numeric (numbers) from a string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720675#M223267</link>
    <description>&lt;P&gt;The correct answer actually depends on details that you haven't specified.&amp;nbsp; What about decimal points?&amp;nbsp; What about minus signs?&amp;nbsp; What about multiple sets of digits?&amp;nbsp; What should each of these become?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff3.14_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff3a1_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff-31_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff3-1_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff3+1_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff+31_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to learn about the COMPRESS function (such as the meaning of "A"), you can read it here:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0fcshr0ir3h73n1b845c4aq58hz.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0fcshr0ir3h73n1b845c4aq58hz.htm&amp;amp;locale=en&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Feb 2021 21:07:16 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2021-02-20T21:07:16Z</dc:date>
    <item>
      <title>take only numeric (numbers) from a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720667#M223262</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;What is the way to take only numeric (numbers) from a string ?&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;Data t;&lt;/P&gt;
&lt;P&gt;input string;&lt;/P&gt;
&lt;P&gt;cards;&lt;/P&gt;
&lt;P&gt;abcd25_fmt&lt;/P&gt;
&lt;P&gt;gfhhff31_qr&lt;/P&gt;
&lt;P&gt;jdhh4gt_r&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to&amp;nbsp; get:&lt;/P&gt;
&lt;P&gt;25&lt;/P&gt;
&lt;P&gt;31&lt;/P&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2021 19:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720667#M223262</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-02-20T19:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: take only numeric (numbers) from a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720669#M223264</link>
      <description>You can achieve this by using a compress function to eliminate non-numeric values.&lt;BR /&gt;&lt;BR /&gt;want= compress(string,'','A');</description>
      <pubDate>Sat, 20 Feb 2021 20:23:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720669#M223264</guid>
      <dc:creator>A_Swoosh</dc:creator>
      <dc:date>2021-02-20T20:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: take only numeric (numbers) from a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720670#M223265</link>
      <description>What does it mean 'A'?&lt;BR /&gt;What is the meaning of ''?&lt;BR /&gt;I ask in order to have logic</description>
      <pubDate>Sat, 20 Feb 2021 20:26:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720670#M223265</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-02-20T20:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: take only numeric (numbers) from a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720674#M223266</link>
      <description>Here is a good link for documentation on what you can do with the modifiers in the compress function.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.lexjansen.com/phuse/2016/cc/CC01" target="_blank"&gt;https://www.lexjansen.com/phuse/2016/cc/CC01&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;The third parameter, 'A' gets rid of all (A-Z) and (a-z) ...while the second parameter, ' ', does nothing other than hold space for the third parameter.</description>
      <pubDate>Sat, 20 Feb 2021 21:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720674#M223266</guid>
      <dc:creator>A_Swoosh</dc:creator>
      <dc:date>2021-02-20T21:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: take only numeric (numbers) from a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720675#M223267</link>
      <description>&lt;P&gt;The correct answer actually depends on details that you haven't specified.&amp;nbsp; What about decimal points?&amp;nbsp; What about minus signs?&amp;nbsp; What about multiple sets of digits?&amp;nbsp; What should each of these become?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff3.14_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff3a1_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff-31_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff3-1_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff3+1_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;gfhhff+31_qr&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to learn about the COMPRESS function (such as the meaning of "A"), you can read it here:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0fcshr0ir3h73n1b845c4aq58hz.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0fcshr0ir3h73n1b845c4aq58hz.htm&amp;amp;locale=en&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2021 21:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720675#M223267</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-02-20T21:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: take only numeric (numbers) from a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720677#M223268</link>
      <description>&lt;P&gt;Another way is to use the compress function with "k" and a positiv list:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want= compress(string,'0123456789','k');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For details of the compress function, see:&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0fcshr0ir3h73n1b845c4aq58hz.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0fcshr0ir3h73n1b845c4aq58hz.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2021 21:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/take-only-numeric-numbers-from-a-string/m-p/720677#M223268</guid>
      <dc:creator>KlausBücher</dc:creator>
      <dc:date>2021-02-20T21:19:13Z</dc:date>
    </item>
  </channel>
</rss>

