<?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 do I find words in text using find() in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-do-I-find-words-in-text-using-find/m-p/309484#M66593</link>
    <description>&lt;P&gt;You're close.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your function appears correct, but you don't need the &amp;gt; 0 portion. That turns it into a true/false calculation rather than returning the index.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also shouldn't apply lowcase if your test is case sensitive. And since you're searching for a word, use FIND&lt;STRONG&gt;&lt;U&gt;W&lt;/U&gt;&lt;/STRONG&gt;()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Index_with = findw(string, 'with');&lt;/P&gt;</description>
    <pubDate>Sat, 05 Nov 2016 09:20:07 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-11-05T09:20:07Z</dc:date>
    <item>
      <title>how do I find words in text using find()</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-I-find-words-in-text-using-find/m-p/309478#M66589</link>
      <description>&lt;P&gt;I am trying to find a word with .Character string 'with' in the title and is zero if there is no first occurrence of &lt;STRONG&gt;'with'&lt;/STRONG&gt; in the text.Moreover, I dont want WITH or WitH type of words. &amp;nbsp;I am using the following code. I am not getting proper output. It is not giving me the numeric value&amp;nbsp;of with in the title or text. Hope to hear suggestions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;length firstwith 4;&lt;BR /&gt;firstwith = (findw(lowcase(string),'with')&amp;gt;0);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2016 08:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-I-find-words-in-text-using-find/m-p/309478#M66589</guid>
      <dc:creator>azee007</dc:creator>
      <dc:date>2016-11-05T08:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: how do I find words in text using find()</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-I-find-words-in-text-using-find/m-p/309484#M66593</link>
      <description>&lt;P&gt;You're close.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your function appears correct, but you don't need the &amp;gt; 0 portion. That turns it into a true/false calculation rather than returning the index.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also shouldn't apply lowcase if your test is case sensitive. And since you're searching for a word, use FIND&lt;STRONG&gt;&lt;U&gt;W&lt;/U&gt;&lt;/STRONG&gt;()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Index_with = findw(string, 'with');&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2016 09:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-I-find-words-in-text-using-find/m-p/309484#M66593</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-05T09:20:07Z</dc:date>
    </item>
  </channel>
</rss>

