<?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 get part of a string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-part-of-a-string/m-p/595502#M171329</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181538"&gt;@mauri0623&lt;/a&gt;&amp;nbsp; Assuming I understand your Data structure/layout&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input string $30.;
cards;
AB290363, 20AL05
IA000074 20AL03
PIV#IA000080 20AL09
;

data want;
set have;
want=scan(string,-1,', ');
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 10 Oct 2019 17:10:54 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-10-10T17:10:54Z</dc:date>
    <item>
      <title>How to get part of a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-part-of-a-string/m-p/595499#M171327</link>
      <description>&lt;P&gt;&lt;U&gt;Hello all.,&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following strings that I am only interested in getting the 20AL05, 20AL03, 20AL09.&lt;/P&gt;&lt;P&gt;AB290363, 20AL05&lt;/P&gt;&lt;P&gt;IA000074 20AL03&lt;/P&gt;&lt;P&gt;PIV#IA000080 20AL09&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me with what function and how I will be able to achieve this.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 17:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-part-of-a-string/m-p/595499#M171327</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2019-10-10T17:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get part of a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-part-of-a-string/m-p/595502#M171329</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181538"&gt;@mauri0623&lt;/a&gt;&amp;nbsp; Assuming I understand your Data structure/layout&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input string $30.;
cards;
AB290363, 20AL05
IA000074 20AL03
PIV#IA000080 20AL09
;

data want;
set have;
want=scan(string,-1,', ');
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Oct 2019 17:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-part-of-a-string/m-p/595502#M171329</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-10-10T17:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get part of a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-part-of-a-string/m-p/595631#M171397</link>
      <description>&lt;P&gt;Instead of telling scan to search from right to left by using a negative index, you could use the fourth parameter:&lt;/P&gt;
&lt;PRE&gt;part = scan(string, 1, ', ', 'b');&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Oct 2019 04:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-part-of-a-string/m-p/595631#M171397</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-10-11T04:58:51Z</dc:date>
    </item>
  </channel>
</rss>

