<?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 How can I find all the special characters? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544049#M150429</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I find all the special characters? and split the special character in a new variable?&lt;/P&gt;&lt;P&gt;for example&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for&amp;nbsp;&lt;CODE class=" language-sas"&gt;JUICE∫app$le,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;I expect to get&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;old&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;special&lt;/TD&gt;&lt;TD&gt;new&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;JUICE∫app$le&lt;/TD&gt;&lt;TD&gt;∫&lt;/TD&gt;&lt;TD&gt;JUICE app le&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;JUICE∫app$le&lt;/TD&gt;&lt;TD&gt;$&lt;/TD&gt;&lt;TD&gt;JUICE app le&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  infile datalines truncover;
  input name $100.;
  datalines;
JUICE∫app$le
juice &amp;lt;BR&amp;gt; apple 
juice, 'apple' 
juice{BODY} ap¶ple 
[BR]juice apple
&amp;lt;figure&amp;gt; "juice" LTD 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Special characters are characters that are not part of the following set of letters, digits and punctuation characters: A-Z; 0-9; “-“; “+”; “’”; “””; “#”; “*”; “@”; “!”; “?”; “/”; “&amp;amp;”; “(“; “)”; “:”; “;”; “,”; “.”; “ “.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please give me some suggestions about this?&lt;/P&gt;&lt;P&gt;thanks in advance&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2019 17:33:59 GMT</pubDate>
    <dc:creator>Alexxxxxxx</dc:creator>
    <dc:date>2019-03-18T17:33:59Z</dc:date>
    <item>
      <title>How can I find all the special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544049#M150429</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I find all the special characters? and split the special character in a new variable?&lt;/P&gt;&lt;P&gt;for example&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for&amp;nbsp;&lt;CODE class=" language-sas"&gt;JUICE∫app$le,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;I expect to get&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;old&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;special&lt;/TD&gt;&lt;TD&gt;new&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;JUICE∫app$le&lt;/TD&gt;&lt;TD&gt;∫&lt;/TD&gt;&lt;TD&gt;JUICE app le&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;JUICE∫app$le&lt;/TD&gt;&lt;TD&gt;$&lt;/TD&gt;&lt;TD&gt;JUICE app le&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  infile datalines truncover;
  input name $100.;
  datalines;
JUICE∫app$le
juice &amp;lt;BR&amp;gt; apple 
juice, 'apple' 
juice{BODY} ap¶ple 
[BR]juice apple
&amp;lt;figure&amp;gt; "juice" LTD 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Special characters are characters that are not part of the following set of letters, digits and punctuation characters: A-Z; 0-9; “-“; “+”; “’”; “””; “#”; “*”; “@”; “!”; “?”; “/”; “&amp;amp;”; “(“; “)”; “:”; “;”; “,”; “.”; “ “.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please give me some suggestions about this?&lt;/P&gt;&lt;P&gt;thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 17:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544049#M150429</guid>
      <dc:creator>Alexxxxxxx</dc:creator>
      <dc:date>2019-03-18T17:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find all the special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544051#M150431</link>
      <description>&lt;P&gt;You could use the FINDC function, with modifiers "A", "K", "D", and the character list would be the punctuation you don't want to find as shown in your message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n1mdh2gvd5potjn14jipysvzn4o7.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n1mdh2gvd5potjn14jipysvzn4o7.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 17:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544051#M150431</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-18T17:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find all the special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544112#M150459</link>
      <description>&lt;P&gt;You could use compress function twice to get both strings. Try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    
    length special new $ 100 specialChars $ 20;
    retain specialChars;
    drop specialChars;
    
    if _N_ = 1 then do;
        specialChars = cat('-+#*@!?/&amp;amp;():;,. "', "'");
    end;
    
    special = compress(name, specialChars, 'adik');
    new = compress(name, specialChars, 'adi');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Mar 2019 21:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544112#M150459</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-18T21:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find all the special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544115#M150462</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   format old special new;
   set have;
   RegExID = prxparse('/[^A-Z|a-z|0-9|-|\+|’|”|#|\*|@|!|\?|\/|&amp;amp;|\(|\)|:|;|,|.]/');
   start=1;
   call prxnext(RegExID, start, length(old), old, pos, length);
   new=prxchange('s/[^A-Z|a-z|0-9|-|\+|’|”|#|\*|@|!|\?|\/|&amp;amp;|\(|\)|:|;|,|.]/ /', -1, old);
      do while (pos &amp;gt; 0);
         special = substr(old, pos, length);
         output;
         call prxnext(RegExID, start, length(old), old, pos, length);
      end;
   keep old special new;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Mar 2019 07:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-find-all-the-special-characters/m-p/544115#M150462</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-19T07:26:56Z</dc:date>
    </item>
  </channel>
</rss>

