<?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: removing first unwanted/non alphabet characters in a column in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119696#M1013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the compress function with the appropriate modifiers or characters for your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name=compress(name, , 'kad');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/syntaxidx/64656/HTML/default/index.htm#/documentation/cdl//en/lefunctionsref/63354/HTML/default/n0fcshr0ir3h73n1b845c4aq58hz.htm" title="http://support.sas.com/documentation/cdl/en/syntaxidx/64656/HTML/default/index.htm#/documentation/cdl//en/lefunctionsref/63354/HTML/default/n0fcshr0ir3h73n1b845c4aq58hz.htm"&gt;http://support.sas.com/documentation/cdl/en/syntaxidx/64656/HTML/default/index.htm#/documentation/cdl//en/lefunctionsref/63354/HTML/default/n0fcshr0ir3h73n1b845c4aq58hz.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can also look into the anypunct functions if you wanted as well. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 May 2012 20:35:34 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2012-05-17T20:35:34Z</dc:date>
    <item>
      <title>removing first unwanted/non alphabet characters in a column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119695#M1012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the have dataset is like the following (the name Liz has one blank space in front of it; Sam has / in front of it):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; city&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state&lt;/P&gt;&lt;P&gt;Liz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NY&lt;/P&gt;&lt;P&gt;/Sam&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SJ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NJ&lt;/P&gt;&lt;P&gt;Norm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CA&lt;/P&gt;&lt;P&gt;Gloria&amp;nbsp;&amp;nbsp;&amp;nbsp; SC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;want to have the first non-alphabet character removed, so the table will be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; city&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state&lt;/P&gt;&lt;P&gt;Liz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NY&lt;/P&gt;&lt;P&gt;Sam&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SJ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NJ&lt;/P&gt;&lt;P&gt;Norm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CA&lt;/P&gt;&lt;P&gt;Gloria&amp;nbsp;&amp;nbsp;&amp;nbsp; SC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what do you use to remove the unwanted characters/spaces?&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 20:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119695#M1012</guid>
      <dc:creator>Cyndia</dc:creator>
      <dc:date>2012-05-17T20:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: removing first unwanted/non alphabet characters in a column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119696#M1013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the compress function with the appropriate modifiers or characters for your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name=compress(name, , 'kad');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/syntaxidx/64656/HTML/default/index.htm#/documentation/cdl//en/lefunctionsref/63354/HTML/default/n0fcshr0ir3h73n1b845c4aq58hz.htm" title="http://support.sas.com/documentation/cdl/en/syntaxidx/64656/HTML/default/index.htm#/documentation/cdl//en/lefunctionsref/63354/HTML/default/n0fcshr0ir3h73n1b845c4aq58hz.htm"&gt;http://support.sas.com/documentation/cdl/en/syntaxidx/64656/HTML/default/index.htm#/documentation/cdl//en/lefunctionsref/63354/HTML/default/n0fcshr0ir3h73n1b845c4aq58hz.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can also look into the anypunct functions if you wanted as well. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 20:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119696#M1013</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-05-17T20:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: removing first unwanted/non alphabet characters in a column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119697#M1014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea, compress.&amp;nbsp; Though it works on the whole string, not just the first letter.&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;input name $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;Liz&lt;/P&gt;&lt;P&gt;/Sam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nancy&lt;/P&gt;&lt;P&gt; /Gloria&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data b;&lt;/P&gt;&lt;P&gt;set a;&lt;/P&gt;&lt;P&gt;newname = compress(name,'/');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 20:39:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119697#M1014</guid>
      <dc:creator>Ajay</dc:creator>
      <dc:date>2012-05-17T20:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: removing first unwanted/non alphabet characters in a column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119698#M1015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; works for me!&amp;nbsp; thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 21:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/119698#M1015</guid>
      <dc:creator>Cyndia</dc:creator>
      <dc:date>2012-05-17T21:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: removing first unwanted/non alphabet characters in a column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/237633#M3485</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You want to remove only special character. But before solution was it removes only "/" and also it compress all the "/".&lt;/P&gt;&lt;P&gt;please check this below solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data t;&lt;BR /&gt;infile cards;&lt;BR /&gt;input a $;&lt;BR /&gt;datalines;&lt;BR /&gt;/ag&lt;BR /&gt;a/g&lt;BR /&gt;ag/&lt;BR /&gt;/gh&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data t1;&lt;BR /&gt;set t;&lt;BR /&gt;if anyalpha(a) ne 1 then do;&lt;BR /&gt;a1=compress(a,substr(a,1,1));&lt;BR /&gt;end;&lt;BR /&gt;else a1=a;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 17:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/removing-first-unwanted-non-alphabet-characters-in-a-column/m-p/237633#M3485</guid>
      <dc:creator>bharathkumar</dc:creator>
      <dc:date>2015-12-03T17:25:56Z</dc:date>
    </item>
  </channel>
</rss>

