<?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: What are the functions to repalce words but not substrings in a character string? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98381#M800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, PG , Ksharp and Linlin. I am in the same boat with Linlin.&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jul 2012 19:24:16 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2012-07-03T19:24:16Z</dc:date>
    <item>
      <title>What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98370#M789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Examples please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 12:42:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98370#M789</guid>
      <dc:creator>devarayalu</dc:creator>
      <dc:date>2012-07-03T12:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98371#M790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;BR /&gt;string='I love dog, i have a lovely dog';&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;&amp;nbsp; set have;&lt;BR /&gt;&amp;nbsp; s=tranwrd(string,' love ',' like ');&lt;BR /&gt;&amp;nbsp; proc print;run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I love dog, i have a lovely dog&amp;nbsp;&amp;nbsp;&amp;nbsp; I like dog, i have a lovely dog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 13:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98371#M790</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-03T13:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98372#M791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check with the following example it is repacing substrings not only words. I want only word replacement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; x= 'For the Format';&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp; y= tranwrd(x, 'For', 'A');&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp; Put y=;&lt;/P&gt;&lt;P&gt;8&lt;/P&gt;&lt;P&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;y=A the Amat&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.25 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.04 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 13:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98372#M791</guid>
      <dc:creator>devarayalu</dc:creator>
      <dc:date>2012-07-03T13:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98373#M792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;94&amp;nbsp;&amp;nbsp; data _null_;&lt;BR /&gt;95&lt;BR /&gt;96&lt;BR /&gt;97&lt;BR /&gt;98&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x= 'For the Format';&lt;BR /&gt;99&lt;BR /&gt;100&lt;BR /&gt;101&lt;BR /&gt;102&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y= tranwrd(x, ' For ', ' A ');&lt;BR /&gt;103&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y= tranwrd(x, 'For ', 'A ');&lt;BR /&gt;104&lt;BR /&gt;105&lt;BR /&gt;106&lt;BR /&gt;107&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Put y=;&lt;BR /&gt;108&lt;BR /&gt;109&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;y=A the Format&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 13:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98373#M792</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-03T13:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98374#M793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your words may be at the beginning/end of a sentence, preceeded/followed by periods/commas/exclamation marks, etc.&lt;/P&gt;&lt;P&gt;\b: word boubdary&lt;/P&gt;&lt;P&gt;ABC: Search string&lt;/P&gt;&lt;P&gt;xyz: Replace string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; string = 'ABC abcde dabc abc abc, abc.';&lt;/P&gt;&lt;P&gt;&amp;nbsp; new_string = PRXCHANGE("s/\bABC\b/xyz/i",-1,string);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put (_all_)(=);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;string=ABC abcde dabc abc abc, abc. new_string=xyz abcde dabc xyz xyz, xyz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 13:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98374#M793</guid>
      <dc:creator>Alpay</dc:creator>
      <dc:date>2012-07-03T13:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98375#M794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, regular expressions do the job! You may improve efficiency by adding the suffix 'o' at the end of the pattern so that it is compiled only once. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 14:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98375#M794</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-03T14:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98376#M795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PG,&lt;/P&gt;&lt;P&gt;Would you please recommend some materials for me to learn&amp;nbsp; about regular expressions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 15:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98376#M795</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-03T15:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98377#M796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Linlin. I'm no expert in regular expressions, I have to get back to the documentation every time I use them! They are omnipresent in the Unix world. Since regular expressions are now present in so many programming environments, there are tons of material out there, Try searching&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"regular expressions" tutorial&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;in Google. Pick something that matches (no pun) your learning style.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 15:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98377#M796</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-03T15:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98378#M797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! I will do as you suggested.&amp;nbsp; - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 15:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98378#M797</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-03T15:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98379#M798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PG,&lt;/P&gt;&lt;P&gt;Thanks for the tip. I will keep that in mind from now on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alpay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 16:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98379#M798</guid>
      <dc:creator>Alpay</dc:creator>
      <dc:date>2012-07-03T16:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98380#M799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it from &lt;A __default_attr="645292" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;, pass it on! - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 18:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98380#M799</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-03T18:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98381#M800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, PG , Ksharp and Linlin. I am in the same boat with Linlin.&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 19:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98381#M800</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-07-03T19:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: What are the functions to repalce words but not substrings in a character string?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98382#M801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am honored to be in the same boat with you. Happy July 4th! - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 19:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/What-are-the-functions-to-repalce-words-but-not-substrings-in-a/m-p/98382#M801</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-03T19:49:48Z</dc:date>
    </item>
  </channel>
</rss>

