<?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 extract a table name from string in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-extract-a-table-name-from-string/m-p/859170#M42271</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input x $65.;
pid=prxparse('/[_a-z]\w*\.[_a-z]\w*/');
call prxsubstr(pid,x,p,l);
if p then want=substr(x,p,l);
drop pid p l;
cards;
if p &amp;lt; 0.5 then no error: put the table abc.story_chapt_2 on the floor
if p &amp;gt; 1.0 then with error: put the table def.cheeze on the floor
if p &amp;lt; 0.5 then no error: put the table xyz.fiction_book4 on the floor
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 16 Feb 2023 11:56:16 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-02-16T11:56:16Z</dc:date>
    <item>
      <title>how to extract a table name from string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-extract-a-table-name-from-string/m-p/859042#M42260</link>
      <description>&lt;P&gt;I want to extract the table name from the strings.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data a;
input x $65.;
cards;
if p &amp;lt; 0.5 then no error: put the table abc.story_chapt_2 on the floor
if p &amp;gt; 1.0 then with error: put the table def.cheeze on the floor
if p &amp;lt; 0.5 then no error: put the table xyz.fiction_book4 on the floor
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the output i want is&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;abc.story_chapt_2&lt;BR /&gt;def.cheeze&lt;BR /&gt;xyz.fiction_book4&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 15 Feb 2023 19:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-extract-a-table-name-from-string/m-p/859042#M42260</guid>
      <dc:creator>JeffSAS</dc:creator>
      <dc:date>2023-02-15T19:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a table name from string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-extract-a-table-name-from-string/m-p/859047#M42261</link>
      <description>&lt;P&gt;Will the name &lt;STRONG&gt;always&lt;/STRONG&gt; follow the word "table"? If so this works, at least for your example&lt;/P&gt;
&lt;PRE&gt;data a;
input x $65.;
length tablename $ 41;
tablename =scan(x,findw(x,'TABLE',' ','IE',1)+1,' ');
cards;
if p &amp;lt; 0.5 then no error: put the table abc.story_chapt_2 on the floor
if p &amp;gt; 1.0 then with error: put the table def.cheeze on the floor
if p &amp;lt; 0.5 then no error: put the table xyz.fiction_book4 on the floor
;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Feb 2023 20:33:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-extract-a-table-name-from-string/m-p/859047#M42261</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-15T20:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a table name from string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-extract-a-table-name-from-string/m-p/859170#M42271</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input x $65.;
pid=prxparse('/[_a-z]\w*\.[_a-z]\w*/');
call prxsubstr(pid,x,p,l);
if p then want=substr(x,p,l);
drop pid p l;
cards;
if p &amp;lt; 0.5 then no error: put the table abc.story_chapt_2 on the floor
if p &amp;gt; 1.0 then with error: put the table def.cheeze on the floor
if p &amp;lt; 0.5 then no error: put the table xyz.fiction_book4 on the floor
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Feb 2023 11:56:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-extract-a-table-name-from-string/m-p/859170#M42271</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-16T11:56:16Z</dc:date>
    </item>
  </channel>
</rss>

