<?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: FINDW Function in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/FINDW-Function/m-p/171305#M44211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably because it ends up trimming the space out of the list of delimiter characters.&amp;nbsp; Add 'S' to the modifiers.&amp;nbsp; Or add other characters such as period and comma to the list of delimiter characters..&amp;nbsp; Also making the list of delimiters a variable instead of an in-line character constant seems to also make it work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2015 23:15:46 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-01-06T23:15:46Z</dc:date>
    <item>
      <title>FINDW Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDW-Function/m-p/171304#M44210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set varin;&lt;/P&gt;&lt;P&gt;found=findw('Art festival.','art','','it');&lt;/P&gt;&lt;P&gt;put found=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code is returning the value of found as 0. Anybody knows why? Even though I am ignoring case and removing trailing blanks from the arguments. If I remove the 't' modifier, the value is returned correctly as 1. If I use STRIP function on the second argument, the value is again returned correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 23:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDW-Function/m-p/171304#M44210</guid>
      <dc:creator>sasmaverick</dc:creator>
      <dc:date>2015-01-06T23:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: FINDW Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDW-Function/m-p/171305#M44211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably because it ends up trimming the space out of the list of delimiter characters.&amp;nbsp; Add 'S' to the modifiers.&amp;nbsp; Or add other characters such as period and comma to the list of delimiter characters..&amp;nbsp; Also making the list of delimiters a variable instead of an in-line character constant seems to also make it work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 23:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDW-Function/m-p/171305#M44211</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-01-06T23:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: FINDW Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDW-Function/m-p/171306#M44212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It says in the the docu:&lt;/P&gt;&lt;H4 class="xis-argument" style="font-family: lato, arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; color: #5d6065; background-color: #ffffff;"&gt;t or T &lt;EM&gt;trims trailing blanks from the &lt;SPAN class="xis-userSuppliedValue"&gt;string&lt;/SPAN&gt;, &lt;SPAN class="xis-userSuppliedValue"&gt;word&lt;/SPAN&gt;, and &lt;SPAN class="xis-userSuppliedValue"&gt;character&lt;/SPAN&gt; arguments.&lt;/EM&gt;&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it appears trimming the character argument removes blanks from the list of word delimiters. Initially not really intuitive to me but then with a bit more thinking isn't this exactly what I would expect to happen if passing in a variable as character argument? So using the 't' switch with an explicit string as character argument is definitely not the right thing to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; found1=findw('Art festival.','art',' ','it');&lt;/P&gt;&lt;P&gt;&amp;nbsp; found2=findw('Art festival.','art','','i');&lt;/P&gt;&lt;P&gt;&amp;nbsp; found3=findw('Art|festival.','art','|','it');&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;found1=0 found2=1 found3=1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 23:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDW-Function/m-p/171306#M44212</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-01-06T23:25:34Z</dc:date>
    </item>
  </channel>
</rss>

