<?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 Extracting text with scan function in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Extracting-text-with-scan-function/m-p/579743#M17725</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;I am trying to extract 'brown_fox' from the whole observation 'A_quick_brown_fox_01' with scan function. Can someone please help. The whole idea is to extract 3rd and 4th word separated by underscores.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2019 20:00:33 GMT</pubDate>
    <dc:creator>mlogan</dc:creator>
    <dc:date>2019-08-07T20:00:33Z</dc:date>
    <item>
      <title>Extracting text with scan function</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extracting-text-with-scan-function/m-p/579743#M17725</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;I am trying to extract 'brown_fox' from the whole observation 'A_quick_brown_fox_01' with scan function. Can someone please help. The whole idea is to extract 3rd and 4th word separated by underscores.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 20:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extracting-text-with-scan-function/m-p/579743#M17725</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2019-08-07T20:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting text with scan function</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extracting-text-with-scan-function/m-p/579748#M17726</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35631"&gt;@mlogan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;I am trying to extract 'brown_fox' from the whole observation 'A_quick_brown_fox_01' with scan function. Can someone please help. The whole idea is to extract 3rd and 4th word separated by underscores.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data abc;
string='A_quick_brown_fox_01_etc_etc_etc';
third=scan(string,3,'_');
fourth=scan(string,4,'_');
want = cats(third,'_',fourth);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Aug 2019 20:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extracting-text-with-scan-function/m-p/579748#M17726</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-08-07T20:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting text with scan function</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extracting-text-with-scan-function/m-p/579749#M17727</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
str='A_quick_brown_fox_01' ;
length want $30;
do _i=3,4;
want=catx('_',want,scan(str,_i,'_'));
end;
drop _:;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Aug 2019 20:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extracting-text-with-scan-function/m-p/579749#M17727</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-07T20:17:21Z</dc:date>
    </item>
  </channel>
</rss>

