<?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 the &amp;quot;-&amp;quot; or &amp;quot;_&amp;quot; between the text, and compress the text? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/621138#M182561</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another possibility is to use the PRXCHANGE function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	want=prxchange('s/(^\s*|-|_|\s*$)//',-1,"   remove - or _  ");
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks for the following patterns &lt;CODE class=" language-sas"&gt;^\s*&lt;FONT color="#FF00FF"&gt;|&lt;/FONT&gt;-&lt;FONT color="#FF00FF"&gt;|&lt;/FONT&gt;_&lt;FONT color="#FF00FF"&gt;|&lt;/FONT&gt;\s*$&lt;/CODE&gt;&amp;nbsp;as many times as needed (-1):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;^\s = zero, one or more (*) blanks (\s) at the beginning of the string (^)&lt;/LI&gt;
&lt;LI&gt;\s$ = zero, one or more (*) blanks (\s) at the beginning of the string ($)&lt;/LI&gt;
&lt;LI&gt;an hyphen (-)&lt;/LI&gt;
&lt;LI&gt;an underscore (_)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;and replace them by nothing.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2020 13:52:34 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2020-01-30T13:52:34Z</dc:date>
    <item>
      <title>Remove all the "-" or "_" between the text, and compress the text?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/620987#M182506</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I remember there is a SAS function which could remove all the "-" or "_" between the text, and compress the text?&amp;nbsp; But I forgot which one.&amp;nbsp;&amp;nbsp; My variable is Charastatic.&amp;nbsp; &amp;nbsp; Please advice.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 20:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/620987#M182506</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2020-01-29T20:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove all the "-" or "_" between the text, and compress the text?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/620990#M182507</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	want=compress("remove - or _","_-");
	put want=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;25         GOPTIONS ACCESSIBLE;
26         data _null_;
27         want=compress("remove - or _","_-");
28         
29         put want=;
30         run;

want=remove  or&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jan 2020 20:59:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/620990#M182507</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2020-01-29T20:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Remove all the "-" or "_" between the text, and compress the text?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/621133#M182557</link>
      <description>&lt;P&gt;I got it work, thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 13:37:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/621133#M182557</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2020-01-30T13:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove all the "-" or "_" between the text, and compress the text?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/621138#M182561</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another possibility is to use the PRXCHANGE function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	want=prxchange('s/(^\s*|-|_|\s*$)//',-1,"   remove - or _  ");
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks for the following patterns &lt;CODE class=" language-sas"&gt;^\s*&lt;FONT color="#FF00FF"&gt;|&lt;/FONT&gt;-&lt;FONT color="#FF00FF"&gt;|&lt;/FONT&gt;_&lt;FONT color="#FF00FF"&gt;|&lt;/FONT&gt;\s*$&lt;/CODE&gt;&amp;nbsp;as many times as needed (-1):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;^\s = zero, one or more (*) blanks (\s) at the beginning of the string (^)&lt;/LI&gt;
&lt;LI&gt;\s$ = zero, one or more (*) blanks (\s) at the beginning of the string ($)&lt;/LI&gt;
&lt;LI&gt;an hyphen (-)&lt;/LI&gt;
&lt;LI&gt;an underscore (_)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;and replace them by nothing.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 13:52:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-all-the-quot-quot-or-quot-quot-between-the-text-and/m-p/621138#M182561</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-01-30T13:52:34Z</dc:date>
    </item>
  </channel>
</rss>

