<?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: replace a string exactly in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/replace-a-string-exactly/m-p/368875#M87984</link>
    <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; need;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;x2=TRANWRD(x,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"abc"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;*I want x should be "aaabbbbccccdddd----def";&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 18:46:04 GMT</pubDate>
    <dc:creator>GeorgeSAS</dc:creator>
    <dc:date>2017-06-20T18:46:04Z</dc:date>
    <item>
      <title>replace a string exactly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replace-a-string-exactly/m-p/368859#M87982</link>
      <description>&lt;PRE&gt;data  have;
x="aaabbbbccccdddd--abc--def";
run;

data need;
set have;
x2=compress(x,"abc");
*I want x should be "aaabbbbccccdddd----def";
run;&lt;/PRE&gt;
&lt;P&gt;How to remove string &amp;nbsp;"abc" exactly from the old string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 18:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replace-a-string-exactly/m-p/368859#M87982</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-06-20T18:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: replace a string exactly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replace-a-string-exactly/m-p/368875#M87984</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; need;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;x2=TRANWRD(x,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"abc"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;*I want x should be "aaabbbbccccdddd----def";&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 18:46:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replace-a-string-exactly/m-p/368875#M87984</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-06-20T18:46:04Z</dc:date>
    </item>
  </channel>
</rss>

