<?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 Check if first character in the string can be numeric, then convert them in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Check-if-first-character-in-the-string-can-be-numeric-then/m-p/742603#M232329</link>
    <description>&lt;P&gt;I have 2 strings string 1 = '1st' and string 2 = 'Super'&lt;/P&gt;&lt;P&gt;I want to have new variable to check if the first character is numeric then convert to number, else empty, like:&lt;/P&gt;&lt;P&gt;new string 1 = 1&lt;/P&gt;&lt;P&gt;new string 2 = .&lt;/P&gt;&lt;P&gt;In Python it's super easy, n&lt;SPAN style="font-family: inherit;"&gt;ot sure how to do that in this programming style.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 20 May 2021 08:46:26 GMT</pubDate>
    <dc:creator>vietlinh12hoa</dc:creator>
    <dc:date>2021-05-20T08:46:26Z</dc:date>
    <item>
      <title>Check if first character in the string can be numeric, then convert them</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Check-if-first-character-in-the-string-can-be-numeric-then/m-p/742603#M232329</link>
      <description>&lt;P&gt;I have 2 strings string 1 = '1st' and string 2 = 'Super'&lt;/P&gt;&lt;P&gt;I want to have new variable to check if the first character is numeric then convert to number, else empty, like:&lt;/P&gt;&lt;P&gt;new string 1 = 1&lt;/P&gt;&lt;P&gt;new string 2 = .&lt;/P&gt;&lt;P&gt;In Python it's super easy, n&lt;SPAN style="font-family: inherit;"&gt;ot sure how to do that in this programming style.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 08:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Check-if-first-character-in-the-string-can-be-numeric-then/m-p/742603#M232329</guid>
      <dc:creator>vietlinh12hoa</dc:creator>
      <dc:date>2021-05-20T08:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Check if first character in the string can be numeric, then convert them</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Check-if-first-character-in-the-string-can-be-numeric-then/m-p/742606#M232332</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/380957"&gt;@vietlinh12hoa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input string $;
cards;
1st
Super
;

data want;
set have;
number=input(string, ?? 1.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 May 2021 08:54:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Check-if-first-character-in-the-string-can-be-numeric-then/m-p/742606#M232332</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-05-20T08:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Check if first character in the string can be numeric, then convert them</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Check-if-first-character-in-the-string-can-be-numeric-then/m-p/742608#M232334</link>
      <description>Thanks a lot.</description>
      <pubDate>Thu, 20 May 2021 08:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Check-if-first-character-in-the-string-can-be-numeric-then/m-p/742608#M232334</guid>
      <dc:creator>vietlinh12hoa</dc:creator>
      <dc:date>2021-05-20T08:58:00Z</dc:date>
    </item>
  </channel>
</rss>

