<?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: extract string from columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816179#M322118</link>
    <description>data utma_test2;&lt;BR /&gt;set test;&lt;BR /&gt;&lt;BR /&gt;array search(5) acct_1-acct_5;&lt;BR /&gt;array find(5) test1 test2 test3 test4 test5;&lt;BR /&gt;&lt;BR /&gt;do i=1 to dim(search);&lt;BR /&gt;if find(search(i), 'ABCD', 'i')&amp;gt;0 then find(i) = 'ABCD';&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 data utma_test2;&lt;BR /&gt;27 set test;&lt;BR /&gt;28&lt;BR /&gt;29 array search(5) acct_1-acct_5;&lt;BR /&gt;30 array find(5) test1 test2 test3 test4 test5;&lt;BR /&gt;NOTE: The array find has the same name as a SAS-supplied or user-defined function. Parentheses following this name are treated as&lt;BR /&gt;array references and not function references.&lt;BR /&gt;31&lt;BR /&gt;32 do i=1 to dim(search);&lt;BR /&gt;33 if find(search(i), 'ABCD', 'i')&amp;gt;0 then find(i) = 'ABCD';&lt;BR /&gt;ERROR: Too many array subscripts specified for array find.&lt;BR /&gt;34 end;&lt;BR /&gt;35 run;&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Jun 2022 12:22:01 GMT</pubDate>
    <dc:creator>Cho8</dc:creator>
    <dc:date>2022-06-02T12:22:01Z</dc:date>
    <item>
      <title>extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814913#M321668</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;need to extract 'ABCD' from the below sample data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;text1&lt;/TD&gt;&lt;TD&gt;text2&lt;/TD&gt;&lt;TD&gt;text3&lt;/TD&gt;&lt;TD&gt;text4&lt;/TD&gt;&lt;TD&gt;text5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MARIANE BAFILE&lt;/TD&gt;&lt;TD&gt;ACF ASHLEY NOZIK NYS &lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;MARIANE BAFILE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MARIANE BAFILE&lt;/TD&gt;&lt;TD&gt;ACF AMANDA NOZIK NYS &lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;MARIANE BAFILE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MARTHA REITMAN ACF&lt;/TD&gt;&lt;TD&gt;LAURA REITMAN U/CA/&lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt;&amp;nbsp; #2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;LAURA REITMAN&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LORNA KENNEDY - PLOWRIGHT&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt; KAVOY LINDSAY PLOWRIGHT&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;RANDALL CRAIG EX&lt;/TD&gt;&lt;TD&gt;CUSTODIAN FOR&lt;/TD&gt;&lt;TD&gt;SHERIDAN C EX&lt;/TD&gt;&lt;TD&gt;UNDER &lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt; PMB321&lt;/TD&gt;&lt;TD&gt;RANDALL CRAIG EX&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SANDRA J PUTMAN&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;SANDRA J PUTMAN&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AARON GUTMAN&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;AARON GUTMAN&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 24 May 2022 16:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814913#M321668</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2022-05-24T16:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814914#M321669</link>
      <description>&lt;P&gt;What does "extract" mean?&lt;BR /&gt;Are you asking to check for observations that have the string "ABCD" in any of this variables you show in your printout?&lt;/P&gt;
&lt;P&gt;What about observations that have "ABCDE"? Should those be included?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  where findw("ABCD",cats(' ',text1,text2,text3,text4,text5));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 May 2022 16:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814914#M321669</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-24T16:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814915#M321670</link>
      <description>&lt;P&gt;NO, I need 'ABCD' , it may occur after / ,# or space.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 16:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814915#M321670</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2022-05-24T16:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814918#M321671</link>
      <description>If the first table is your expected input data set, show the expected output data set you want after extraction.</description>
      <pubDate>Tue, 24 May 2022 17:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814918#M321671</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-05-24T17:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814919#M321672</link>
      <description>&lt;P&gt;expected output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;texta&lt;/TD&gt;&lt;TD&gt;textb&lt;/TD&gt;&lt;TD&gt;textc&lt;/TD&gt;&lt;TD&gt;textd&lt;/TD&gt;&lt;TD&gt;texte&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;ABCD&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;ABCD&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;ABCD&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;ABCD&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;ABCD&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 24 May 2022 17:06:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814919#M321672</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2022-05-24T17:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814921#M321673</link>
      <description>&lt;P&gt;You need to explain in more detail what you are trying to do.&amp;nbsp; You cannot write code to extract a random word from a string (well you could but the result would be just a random word).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the rule that explains why the text ABCD should be pulled from those input strings.&amp;nbsp; Why not any of the other words in the string.&amp;nbsp; Does the ABCD change? Or are you literally looking for ABCD?&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814921#M321673</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-24T17:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814948#M321686</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;

array word_search(5) text1-text5;
array word_find(5) texta textb textc textd texte;

do i=1 to dim(word_search);
if findw(word_search(i), 'ABCD', 'it')&amp;gt;0 then word_find(i) = 'ABCD';
end;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Suspect this will not generalize but based on what you've posted this would meet the requirements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/354671"&gt;@Cho8&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;need to extract 'ABCD' from the below sample data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;text1&lt;/TD&gt;
&lt;TD&gt;text2&lt;/TD&gt;
&lt;TD&gt;text3&lt;/TD&gt;
&lt;TD&gt;text4&lt;/TD&gt;
&lt;TD&gt;text5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MARIANE BAFILE&lt;/TD&gt;
&lt;TD&gt;ACF ASHLEY NOZIK NYS &lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;MARIANE BAFILE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MARIANE BAFILE&lt;/TD&gt;
&lt;TD&gt;ACF AMANDA NOZIK NYS &lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;MARIANE BAFILE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MARTHA REITMAN ACF&lt;/TD&gt;
&lt;TD&gt;LAURA REITMAN U/CA/&lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt;&amp;nbsp; #2&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;LAURA REITMAN&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;LORNA KENNEDY - PLOWRIGHT&lt;/TD&gt;
&lt;TD&gt;&lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt; KAVOY LINDSAY PLOWRIGHT&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;RANDALL CRAIG EX&lt;/TD&gt;
&lt;TD&gt;CUSTODIAN FOR&lt;/TD&gt;
&lt;TD&gt;SHERIDAN C EX&lt;/TD&gt;
&lt;TD&gt;UNDER &lt;FONT color="#FF6600"&gt;ABCD&lt;/FONT&gt; PMB321&lt;/TD&gt;
&lt;TD&gt;RANDALL CRAIG EX&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;SANDRA J PUTMAN&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;SANDRA J PUTMAN&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;AARON GUTMAN&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;AARON GUTMAN&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 14:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814948#M321686</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-05-25T14:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814986#M321702</link>
      <description>&lt;P&gt;its pattern,i need only that ,it may occur with delimiters like&amp;nbsp; /,space,#.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it may occur in middle of the name with space delimiter..but idont need that string if its part of name..for eg.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;text1:forabcd.. idont require to extract..&lt;/P&gt;&lt;P&gt;textt1: forage abcd felix .. i have to extract abcd pattern&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 06:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/814986#M321702</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2022-05-25T06:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/815032#M321719</link>
      <description>If the posted solution does not work, show how with examples and it can be modified. &lt;BR /&gt;&lt;BR /&gt;I modified the FIND to FINDW to search for words in the string. &lt;BR /&gt;</description>
      <pubDate>Wed, 25 May 2022 14:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/815032#M321719</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-05-25T14:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/815036#M321721</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/354671"&gt;@Cho8&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;its pattern,i need only that ,it may occur with delimiters like&amp;nbsp; /,space,#.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it may occur in middle of the name with space delimiter..but idont need that string if its part of name..for eg.,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;text1:forabcd.. idont require to extract..&lt;/P&gt;
&lt;P&gt;textt1: forage abcd felix .. i have to extract abcd pattern&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why are you using the word extract?&amp;nbsp; What is it that you want to extract?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;abcd is NOT a pattern.&amp;nbsp; It is just a string of four letters.&amp;nbsp; A pattern would be something like four letters.&amp;nbsp; Then strings like ABCD or WXYZ would match that pattern.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you just want to detect if the string ABCD appears in a variable you can use the FINDW() or INDEXW() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you actually do have a pattern then perhaps you want to use regular expressions to search for them.&amp;nbsp; But before you can write the regular expression you need say what pattern you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 15:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/815036#M321721</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-25T15:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816016#M322062</link>
      <description>data test_abcd;&lt;BR /&gt;set abcd;&lt;BR /&gt;test1=scan(acct_1,1," ""/","b");&lt;BR /&gt;test2=scan(acct_2,1," ""/","b");&lt;BR /&gt;test3=scan(acct_3,1," ""/","b");&lt;BR /&gt;test4=scan(acct_4,1," ""/","b");&lt;BR /&gt;test5=scan(acct_5,1," ""/","b");&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table test2_abcd as select *,&lt;BR /&gt;(case when test1 like '%ABCD%' or test2 like '%ABCD%'&lt;BR /&gt;or test3 like '%ABCD%' or test4 like '%ABCD%'&lt;BR /&gt;or test5 like '%ABCD%' then 'Y' else 'N' end)as IND&lt;BR /&gt;from WORK.TEST_ABCD ;&lt;BR /&gt;quit;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Jun 2022 11:43:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816016#M322062</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2022-06-01T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816017#M322063</link>
      <description>in the above code, Iam not able to scan the whole string for the pattern, its only scanning last word.</description>
      <pubDate>Wed, 01 Jun 2022 11:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816017#M322063</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2022-06-01T11:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816019#M322064</link>
      <description>Did you try &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s array solution?  If so, what did you not like about that approach?</description>
      <pubDate>Wed, 01 Jun 2022 12:54:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816019#M322064</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-06-01T12:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816043#M322066</link>
      <description>its throwing syntax error @findw.</description>
      <pubDate>Wed, 01 Jun 2022 16:07:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816043#M322066</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2022-06-01T16:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816044#M322067</link>
      <description>Please show the log with the code and the error message.</description>
      <pubDate>Wed, 01 Jun 2022 16:13:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816044#M322067</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-06-01T16:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816179#M322118</link>
      <description>data utma_test2;&lt;BR /&gt;set test;&lt;BR /&gt;&lt;BR /&gt;array search(5) acct_1-acct_5;&lt;BR /&gt;array find(5) test1 test2 test3 test4 test5;&lt;BR /&gt;&lt;BR /&gt;do i=1 to dim(search);&lt;BR /&gt;if find(search(i), 'ABCD', 'i')&amp;gt;0 then find(i) = 'ABCD';&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 data utma_test2;&lt;BR /&gt;27 set test;&lt;BR /&gt;28&lt;BR /&gt;29 array search(5) acct_1-acct_5;&lt;BR /&gt;30 array find(5) test1 test2 test3 test4 test5;&lt;BR /&gt;NOTE: The array find has the same name as a SAS-supplied or user-defined function. Parentheses following this name are treated as&lt;BR /&gt;array references and not function references.&lt;BR /&gt;31&lt;BR /&gt;32 do i=1 to dim(search);&lt;BR /&gt;33 if find(search(i), 'ABCD', 'i')&amp;gt;0 then find(i) = 'ABCD';&lt;BR /&gt;ERROR: Too many array subscripts specified for array find.&lt;BR /&gt;34 end;&lt;BR /&gt;35 run;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2022 12:22:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816179#M322118</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2022-06-02T12:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: extract string from columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816194#M322126</link>
      <description>&lt;P&gt;The NOTE in the log explains the problem.&amp;nbsp; Suggest changing the name of the array to Find_ or Found or whatever names makes sense and isn't already being used by SAS.&amp;nbsp; You'll have to change the name in both the array statement and when you reference the array.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 14:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-string-from-columns/m-p/816194#M322126</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-06-02T14:24:17Z</dc:date>
    </item>
  </channel>
</rss>

