<?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: Remove letter or number from string by using compress? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798246#M313816</link>
    <description>I got the code from the someone else.</description>
    <pubDate>Wed, 23 Feb 2022 20:55:55 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2022-02-23T20:55:55Z</dc:date>
    <item>
      <title>Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798173#M313796</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to use "compress" to remove the letter or number from the string.&amp;nbsp; &amp;nbsp;Somehow it didn't work.&amp;nbsp; &amp;nbsp;Please let me know how to fix it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID_=compress(strip(upcase(ID)),'A0'x);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Below is some sample strings:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;BIPAP (BIPHASIC POSITIVE AIRWAY PRESSURE) DEPENDENCE, CHRONIC RESPIRATORY FAILURE&lt;/LI&gt;
&lt;LI&gt;CHRONIC RESPIRATORY FAILURE &amp;amp; VENT/TRACH DEPENDENT&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I expect the result is shown below.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;(),&lt;/LI&gt;
&lt;LI&gt;&amp;amp; /&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 23 Feb 2022 17:58:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798173#M313796</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-02-23T17:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798184#M313797</link>
      <description>&lt;P&gt;This is a great situation where you should just look at the documentation. What option of the COMPRESS function removes numbers? What option of the COMPRESS function removes letters?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Documentation:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll get you started: remove letters&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID_=compress(strip(ID), ,'a');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I assign you the homework to figure out how to remove numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 22:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798184#M313797</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-02-23T22:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798187#M313798</link>
      <description>The link is not working...</description>
      <pubDate>Wed, 23 Feb 2022 18:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798187#M313798</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-02-23T18:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798190#M313799</link>
      <description>&lt;P&gt;Works for me. What error do you get?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 18:06:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798190#M313799</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-02-23T18:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798192#M313800</link>
      <description>Page Not Found</description>
      <pubDate>Wed, 23 Feb 2022 18:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798192#M313800</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-02-23T18:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798199#M313802</link>
      <description>&lt;P&gt;But you only asked it to remove that single character with the hexcode of A0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="xisDoc-keyword"&gt;COMPRESS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p1cfydc2ifh484n1fodgztvpebog" target="_blank"&gt;source&lt;/A&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN class="xisDoc-optional"&gt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p1cm6en3ihcusmn1u6x1ue6vyvcj" target="_blank"&gt;characters&lt;/A&gt;&lt;/EM&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN class="xisDoc-optional"&gt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p0t37skg8o4cfgn166syt5boeofr" target="_blank"&gt;modifier(s)&lt;/A&gt;&lt;/EM&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 18:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798199#M313802</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-23T18:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798201#M313803</link>
      <description>&lt;P&gt;Works for me also. From where are you accessing the internet? Maybe a badly configured firewall interferes.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 18:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798201#M313803</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-23T18:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798212#M313805</link>
      <description>What's X for?</description>
      <pubDate>Wed, 23 Feb 2022 19:08:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798212#M313805</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-02-23T19:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798216#M313807</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;What's X for?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why are you asking me? You posted the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID_=compress(strip(upcase(ID)),'A0'x);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This code is requesting that any instances of the character represented by the hexadecimal code A0 be removed.&amp;nbsp; &amp;nbsp;That code is frequently used on Web pages as a non-breaking space so that multiple word phrases are not wrapped in the middle.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The letter X after a quoted string indicts a string literal in hexadecimal notation.&amp;nbsp; Just like the letter D after a quoted string indicates a date literal in a style that the DATE informat can interpret.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 19:20:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798216#M313807</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-23T19:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798246#M313816</link>
      <description>I got the code from the someone else.</description>
      <pubDate>Wed, 23 Feb 2022 20:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798246#M313816</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-02-23T20:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798252#M313818</link>
      <description>&lt;P&gt;So, it seems like the code below works for the result I want, which needs to have three arguments instead of two.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID_=compress(strip(upcase(ID_)), , 'A');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I still don't understand why two arguments are not working.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID_=compress(strip(upcase(ID_)), 'A');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Feb 2022 21:02:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798252#M313818</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-02-23T21:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798255#M313819</link>
      <description>&lt;P&gt;The first one is using the modifier A.&amp;nbsp; The second one is just asking to remove the capital letter A.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="xisDoc-keyword"&gt;COMPRESS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p1cfydc2ifh484n1fodgztvpebog" target="_blank" rel="nofollow noopener noreferrer"&gt;source&lt;/A&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN class="xisDoc-optional"&gt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p1cm6en3ihcusmn1u6x1ue6vyvcj" target="_blank" rel="nofollow noopener noreferrer"&gt;characters&lt;/A&gt;&lt;/EM&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;SPAN class="xisDoc-optional"&gt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p0t37skg8o4cfgn166syt5boeofr" target="_blank" rel="nofollow noopener noreferrer"&gt;modifier(s)&lt;/A&gt;&lt;/EM&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 21:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798255#M313819</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-23T21:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798267#M313824</link>
      <description>&lt;P&gt;Why do you write in your original message about removing numbers, and then give no example where numbers should be removed?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 22:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798267#M313824</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-02-23T22:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798287#M313829</link>
      <description>Because the actual data contain numbers and charater.</description>
      <pubDate>Thu, 24 Feb 2022 01:25:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798287#M313829</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-02-24T01:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Remove letter or number from string by using compress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798387#M313868</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Because the actual data contain numbers and charater.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So to help all of us in the future, from now on, please give us representative examples that illustrate the ENTIRE problem; in this case, examples involving numbers, and examples involving characters.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 14:11:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-letter-or-number-from-string-by-using-compress/m-p/798387#M313868</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-02-24T14:11:31Z</dc:date>
    </item>
  </channel>
</rss>

