<?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: Find And Replace within a string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Find-And-Replace-within-a-string/m-p/384592#M91853</link>
    <description>Thank you.</description>
    <pubDate>Tue, 01 Aug 2017 13:21:12 GMT</pubDate>
    <dc:creator>CHAN07</dc:creator>
    <dc:date>2017-08-01T13:21:12Z</dc:date>
    <item>
      <title>Find And Replace within a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-And-Replace-within-a-string/m-p/384450#M91809</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable called Degree. It has various values such as:&lt;/P&gt;&lt;P&gt;MD&lt;/P&gt;&lt;P&gt;NP&lt;/P&gt;&lt;P&gt;PA&lt;/P&gt;&lt;P&gt;MD-PHD&lt;/P&gt;&lt;P&gt;MD PHD&lt;/P&gt;&lt;P&gt;PA-C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to search within the degree variable and look for space or - and replace it with ;.&amp;nbsp;So basically I want the output like MD;PHD, PA;C. I am using TRANWRD function but it's not working for multiple characters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chandan Mishra&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 21:38:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-And-Replace-within-a-string/m-p/384450#M91809</guid>
      <dc:creator>CHAN07</dc:creator>
      <dc:date>2017-07-31T21:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Find And Replace within a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-And-Replace-within-a-string/m-p/384452#M91810</link>
      <description>&lt;P&gt;I would use the translate function. e.g.:&lt;/P&gt;
&lt;PRE&gt;data have;
  informat degree $20.;
  input degree &amp;amp;;
  cards;
MD
NP
PA
MD-PHD
MD PHD
PA-C
;

data want;
  set have;
  degree=translate(strip(degree),";;"," -");
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 21:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-And-Replace-within-a-string/m-p/384452#M91810</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-07-31T21:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Find And Replace within a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-And-Replace-within-a-string/m-p/384592#M91853</link>
      <description>Thank you.</description>
      <pubDate>Tue, 01 Aug 2017 13:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-And-Replace-within-a-string/m-p/384592#M91853</guid>
      <dc:creator>CHAN07</dc:creator>
      <dc:date>2017-08-01T13:21:12Z</dc:date>
    </item>
  </channel>
</rss>

