<?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 to character string from a sentence in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284895#M58143</link>
    <description>&lt;P&gt;Look at TRANWRD function&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2016 17:21:29 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-07-15T17:21:29Z</dc:date>
    <item>
      <title>How to character string from a sentence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284892#M58141</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have variable(value) whose values contain 'NCS' . I need to remove the string. Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value&lt;BR /&gt;"sentence of words NCS"&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"sentence of&amp;nbsp;&lt;/SPAN&gt;words (NCS)"&lt;BR /&gt;"NCS , &lt;SPAN&gt;sentence of&amp;nbsp;&lt;/SPAN&gt;words"&lt;BR /&gt;"NCS &lt;SPAN&gt;sentence of&amp;nbsp;&lt;/SPAN&gt;words"&lt;BR /&gt;"NCS; &lt;SPAN&gt;sentence of&amp;nbsp;&lt;/SPAN&gt;words"&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 17:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284892#M58141</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-07-15T17:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to character string from a sentence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284895#M58143</link>
      <description>&lt;P&gt;Look at TRANWRD function&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 17:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284895#M58143</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-15T17:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to character string from a sentence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284906#M58146</link>
      <description>&lt;P&gt;You may try COMPRESS function too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;new_Value = compress(Value, 'NCS',' ');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have comma, semicolon, '(' and ')'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These also can be compressed into blanks or none.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 17:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284906#M58146</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2016-07-15T17:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to character string from a sentence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284999#M58179</link>
      <description>&lt;PRE&gt;
You didn't post then output yet.



data have;
input value $quote40.;
cards4;
"sentence of words NCS"
"sentence of words (NCS)"
"NCS , sentence of words"
"NCS sentence of words"
"NCS; sentence of words"
;;;;
run;
data want;
 set have;
 new_value=prxchange('s/\bNCS\b//i',-1,value);
run;

&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Jul 2016 06:26:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/284999#M58179</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-07-16T06:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to character string from a sentence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/285046#M58198</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help. It worked, but removed only 'NCS' characters only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"sentence of words "
"sentence of words ()"
" , sentence of words"
" sentence of words"
"; sentence of words"&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Jul 2016 15:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/285046#M58198</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-07-16T15:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to character string from a sentence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/285077#M58206</link>
      <description>Then what output do you expect ?</description>
      <pubDate>Sun, 17 Jul 2016 01:17:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-character-string-from-a-sentence/m-p/285077#M58206</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-07-17T01:17:20Z</dc:date>
    </item>
  </channel>
</rss>

