<?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 all special characters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586009#M167228</link>
    <description>&lt;P&gt;Seems like this is what you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    x='/a/s/vvv122!!@#jfjfjf2222/-';
    y=compress(x,'','kad');
    put y;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Sep 2019 06:14:31 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-09-04T06:14:31Z</dc:date>
    <item>
      <title>remove all special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586007#M167227</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;What is the way to remove all special characters&lt;/P&gt;
&lt;P&gt;The current value is&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;CODE class=" language-sas"&gt;/a/s/vvv122!!@#jfjfjf2222/-&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;and desired value is&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;CODE class=" language-sas"&gt;asvvv122jfjfjf2222&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data aaa;
x='/a/s/vvv122!!@#jfjfjf2222/-';
w1=compress(x, '/');/*remove / */
w2=compress(x,'','kd');/*Keeps only digits*/
w3=compress(x,"","ka");/*Keep only alphanumeric characters*/
w4=compress(x, ' ', 'A');/*Keeps only digits and special characters*/
Run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 06:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586007#M167227</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-09-04T06:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: remove all special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586009#M167228</link>
      <description>&lt;P&gt;Seems like this is what you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    x='/a/s/vvv122!!@#jfjfjf2222/-';
    y=compress(x,'','kad');
    put y;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2019 06:14:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586009#M167228</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-04T06:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: remove all special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586010#M167229</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;w5=compress(x,"abcdefghijklmnopqrstuvwxyz1234567890","k");/*Keeps only digits and characters*/&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you are sure about the variable listed only character and numeric then use the given code.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 06:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586010#M167229</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2019-09-04T06:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: remove all special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586046#M167250</link>
      <description>&lt;P&gt;Alternatively&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    x='/a/s/vvv122!!@#jfjfjf2222/-';
    y=prxchange('s/\W//', -1, x); 
    put y;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2019 10:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586046#M167250</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-04T10:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: remove all special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586061#M167261</link>
      <description>&lt;P&gt;Alternatively with perl regular expression to perform the below 4 actions&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data aaa;
x='/a/s/vvv122!!@#jfjfjf2222/-';
w1=prxchange('s#/##',-1,x); /*remove / */
w2=prxchange('s#\D*##',-1,x);/*Keeps only digits*/
w3=prxchange('s#(\W)##i',-1,x);/*Keeps only digits*/
w4=prxchange('s#[[:alpha:]]##i',-1,x);/*Keeps only digits and special characters*/
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 11:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/586061#M167261</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-09-04T11:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: remove all special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/731983#M228077</link>
      <description>Thank you Sathish_Jammy! It was very easy to use your code!</description>
      <pubDate>Wed, 07 Apr 2021 16:51:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/731983#M228077</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-07T16:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: then how to keep only special char</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/744645#M233304</link>
      <description>&lt;P&gt;i've read ur code and then i have a doubt what if we only keep special char thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 May 2021 12:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/744645#M233304</guid>
      <dc:creator>saidatta</dc:creator>
      <dc:date>2021-05-30T12:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: remove all special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/762232#M241313</link>
      <description>&lt;P&gt;Hi Jagadeesh&lt;/P&gt;
&lt;P&gt;Your regular expressions solutions are very impressive please give any videos&amp;nbsp; on regx&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 07:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-all-special-characters/m-p/762232#M241313</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2021-08-18T07:07:03Z</dc:date>
    </item>
  </channel>
</rss>

