<?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: Cannot find the word in  the string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454962#M115024</link>
    <description>&lt;P&gt;There's another good reason that SAS can't find the string ... it isn't there. Character strings in SAS are case-sensitive.&amp;nbsp; So you should be checking:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if&amp;nbsp;&lt;SPAN&gt;index(lowcase(test), 'paclitaxel')&amp;nbsp; then pre_TAXANE = 1 ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The IF condition will be true for values that are neither 0 nor missing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;***************** EDITED:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;you're right.&amp;nbsp; My bad.&amp;nbsp; LOWCASE is already built into the logic.&amp;nbsp; Where's that coffee?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Apr 2018 01:38:56 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-04-18T01:38:56Z</dc:date>
    <item>
      <title>Cannot find the word in  the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454943#M115022</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to find&amp;nbsp; "Paclitaxel" in the string, however I could not find it using index , and , findw , function even I only keep aplphbet and ","&amp;nbsp; .&amp;nbsp; However, I can find "carboplatin"&amp;nbsp; .&amp;nbsp; &amp;nbsp; Any solution ?&amp;nbsp; Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;test = compress(lowcase(regimen),'abcdefghijklmnopqrstuvwxyz,','k') ;&lt;/P&gt;&lt;P&gt;if index(test, 'paclitaxel') = 1 then pre_TAXANE = 1 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regimen&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV&gt;&lt;DIV align="left"&gt;&lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Afatinib,Carboplatin,Paclitaxel&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Afatinib,Carboplatin,Paclitaxel Protein-Bound&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Apr 2018 21:30:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454943#M115022</guid>
      <dc:creator>Ivy</dc:creator>
      <dc:date>2018-04-17T21:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot find the word in  the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454946#M115023</link>
      <description>&lt;P&gt;INDEX returns the position, not a 0/1. Therefore your test of =1 will only be true if the word is at the exact beginning. Change your condition to test if it’s &amp;gt;0 instead.&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/70526"&gt;@Ivy&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find&amp;nbsp; "Paclitaxel" in the string, however I could not find it using index , and , findw , function even I only keep aplphbet and ","&amp;nbsp; .&amp;nbsp; However, I can find "carboplatin"&amp;nbsp; .&amp;nbsp; &amp;nbsp; Any solution ?&amp;nbsp; Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;test = compress(lowcase(regimen),'abcdefghijklmnopqrstuvwxyz,','k') ;&lt;/P&gt;
&lt;P&gt;if index(test, 'paclitaxel') = 1 then pre_TAXANE = 1 ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regimen&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Afatinib,Carboplatin,Paclitaxel&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;.&lt;/TD&gt;
&lt;TD&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Afatinib,Carboplatin,Paclitaxel Protein-Bound&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;.&lt;/TD&gt;
&lt;TD&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 21:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454946#M115023</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-17T21:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot find the word in  the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454962#M115024</link>
      <description>&lt;P&gt;There's another good reason that SAS can't find the string ... it isn't there. Character strings in SAS are case-sensitive.&amp;nbsp; So you should be checking:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if&amp;nbsp;&lt;SPAN&gt;index(lowcase(test), 'paclitaxel')&amp;nbsp; then pre_TAXANE = 1 ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The IF condition will be true for values that are neither 0 nor missing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;***************** EDITED:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;you're right.&amp;nbsp; My bad.&amp;nbsp; LOWCASE is already built into the logic.&amp;nbsp; Where's that coffee?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 01:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454962#M115024</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-04-18T01:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot find the word in  the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454984#M115032</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;doesn't the previous statement lowcase everything?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/70526"&gt;@Ivy&lt;/a&gt;&amp;nbsp;review the modifiers so that you can avoid listing all the alphabet in your list. I think its 'ka' to keep all alphabetic values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 01:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/454984#M115032</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-18T01:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot find the word in  the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/455000#M115037</link>
      <description>&lt;P&gt;Coffee? I'm about to&amp;nbsp;go to bed and I'm on the West Coast &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 02:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/455000#M115037</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-18T02:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot find the word in  the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/455193#M115116</link>
      <description>&lt;P&gt;Thank you both very much for the quick response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a bless that your guys here. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great day !&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/455193#M115116</guid>
      <dc:creator>Ivy</dc:creator>
      <dc:date>2018-04-18T14:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot find the word in  the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/455197#M115118</link>
      <description>I would like to keep all alphabetic and "," , hope this is a way. Thank you again !</description>
      <pubDate>Wed, 18 Apr 2018 14:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-find-the-word-in-the-string/m-p/455197#M115118</guid>
      <dc:creator>Ivy</dc:creator>
      <dc:date>2018-04-18T14:12:14Z</dc:date>
    </item>
  </channel>
</rss>

