<?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 substring in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474310#M121846</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to remove '&lt;SPAN&gt;B4071234'&amp;nbsp; &amp;nbsp; from subjid variable -&lt;/SPAN&gt;B4071234 1234 11111111&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data final&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set test;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;substr(strip(CONT_CD),1,8)='';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jun 2018 00:26:00 GMT</pubDate>
    <dc:creator>de</dc:creator>
    <dc:date>2018-06-29T00:26:00Z</dc:date>
    <item>
      <title>substring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474310#M121846</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to remove '&lt;SPAN&gt;B4071234'&amp;nbsp; &amp;nbsp; from subjid variable -&lt;/SPAN&gt;B4071234 1234 11111111&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data final&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set test;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;substr(strip(CONT_CD),1,8)='';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 00:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474310#M121846</guid>
      <dc:creator>de</dc:creator>
      <dc:date>2018-06-29T00:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: substring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474313#M121848</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
var='B4071234 1234 11111111';
want=substr(var,anyspace(var));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jun 2018 00:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474313#M121848</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-29T00:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: substring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474314#M121849</link>
      <description>&lt;P&gt;When SUBSTR appears to the left of the equal sign, the first parameter must be a variable name (not an expression such as using STRIP).&amp;nbsp; You could try something along the lines of:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CONT_CD = substr(CONT_CD, 10);&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 00:33:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474314#M121849</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-29T00:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: substring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474319#M121850</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you mean anyspace ?&amp;nbsp; number of character to remove ?&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;want&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;substr&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;anyspace&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 01:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474319#M121850</guid>
      <dc:creator>de</dc:creator>
      <dc:date>2018-06-29T01:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: substring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474332#M121854</link>
      <description>&lt;P&gt;basically that logic finds a the first blank space which is the delimiter and extracts all chars after the delimiter space, consequently ignoring the chars you mentioned above&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 02:43:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substring/m-p/474332#M121854</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-29T02:43:19Z</dc:date>
    </item>
  </channel>
</rss>

