<?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: How do I find a number of special characters such as delimiter in a string? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-find-a-number-of-special-characters-such-as-delimiter/m-p/561004#M156985</link>
    <description>Try removing the middle parameter:&lt;BR /&gt;&lt;BR /&gt;name1 = compress(name,,'adk') ;&lt;BR /&gt;&lt;BR /&gt;Then:&lt;BR /&gt;&lt;BR /&gt;if lengthn(name) ne lengthn(name1) then flag=1;</description>
    <pubDate>Thu, 23 May 2019 01:19:41 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2019-05-23T01:19:41Z</dc:date>
    <item>
      <title>How do I find a number of special characters such as delimiter in a string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-find-a-number-of-special-characters-such-as-delimiter/m-p/560999#M156982</link>
      <description>&lt;P&gt;I am trying to remove special characters in variable NAME. I want a variable to flag that the name has changed so if there is such character in the NAME string, set this to 1. My question is, what would be the most efficient way to achieve this?&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Names;
	input name &amp;amp; $32.;
	datalines;
		B/E Aerospace Inc 005
		A H Belo Corp12 
		A. H. BELO CORP  412
		A-H BELO CORP 125
		A - H BELO CORP 124
		;
run;
data names;set names;
	name1=compress(name,'','adk');
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I want:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Name                                                  Flag
BE Aerospace Inc 005                        Yes
A H Belo Corp12                                 No
A H BELO CORP  412                        Yes
AH BELO CORP 125                          Yes
A H BELO CORP 124                         Yes&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 May 2019 00:56:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-find-a-number-of-special-characters-such-as-delimiter/m-p/560999#M156982</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2019-05-23T00:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find a number of special characters such as delimiter in a string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-find-a-number-of-special-characters-such-as-delimiter/m-p/561004#M156985</link>
      <description>Try removing the middle parameter:&lt;BR /&gt;&lt;BR /&gt;name1 = compress(name,,'adk') ;&lt;BR /&gt;&lt;BR /&gt;Then:&lt;BR /&gt;&lt;BR /&gt;if lengthn(name) ne lengthn(name1) then flag=1;</description>
      <pubDate>Thu, 23 May 2019 01:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-find-a-number-of-special-characters-such-as-delimiter/m-p/561004#M156985</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-05-23T01:19:41Z</dc:date>
    </item>
  </channel>
</rss>

