<?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 Fuzzy find/kindex in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541212#M149394</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem about fuzzy find/kindex.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two columns, "All_members" and "Excellent".&amp;nbsp; I want to generate a new column "Excellent_in" to indicate if "Excellent" is in "All_members".&amp;nbsp; I usually do this by writing:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if kindex(All_members, Excellent)&amp;gt;0;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, as it is shown, the name does not perfectly match here. I guess I need some fuzzy find/kindex&amp;nbsp;function here.&amp;nbsp; I will appreciate it very much if someone can help me with this.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;All_members&lt;/TD&gt;&lt;TD&gt;Excellent&lt;/TD&gt;&lt;TD&gt;Excellent_in&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Lee Han llp, Det tet co., 3M Inc.&lt;/TD&gt;&lt;TD&gt;3M&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;……&lt;/TD&gt;&lt;TD&gt;……&lt;/TD&gt;&lt;TD&gt;……&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Vans co, nineng inc., leiwo&lt;/TD&gt;&lt;TD&gt;wyu&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Vans co, nineng inc., leiwo&lt;/TD&gt;&lt;TD&gt;leiwo inc&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Thu, 07 Mar 2019 20:40:25 GMT</pubDate>
    <dc:creator>daradanye</dc:creator>
    <dc:date>2019-03-07T20:40:25Z</dc:date>
    <item>
      <title>Fuzzy find/kindex</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541212#M149394</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem about fuzzy find/kindex.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two columns, "All_members" and "Excellent".&amp;nbsp; I want to generate a new column "Excellent_in" to indicate if "Excellent" is in "All_members".&amp;nbsp; I usually do this by writing:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if kindex(All_members, Excellent)&amp;gt;0;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, as it is shown, the name does not perfectly match here. I guess I need some fuzzy find/kindex&amp;nbsp;function here.&amp;nbsp; I will appreciate it very much if someone can help me with this.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;All_members&lt;/TD&gt;&lt;TD&gt;Excellent&lt;/TD&gt;&lt;TD&gt;Excellent_in&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Lee Han llp, Det tet co., 3M Inc.&lt;/TD&gt;&lt;TD&gt;3M&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;……&lt;/TD&gt;&lt;TD&gt;……&lt;/TD&gt;&lt;TD&gt;……&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Vans co, nineng inc., leiwo&lt;/TD&gt;&lt;TD&gt;wyu&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Vans co, nineng inc., leiwo&lt;/TD&gt;&lt;TD&gt;leiwo inc&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 07 Mar 2019 20:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541212#M149394</guid>
      <dc:creator>daradanye</dc:creator>
      <dc:date>2019-03-07T20:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fuzzy find/kindex</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541261#M149409</link>
      <description>&lt;P&gt;kindex() should not be fuzzy.&lt;/P&gt;
&lt;P&gt;I could not replicate from your example sadly.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  A=kindex('Vans co, nineng inc., leiwo', 'leiwo inc');  
  put A=; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A=0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 22:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541261#M149409</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-03-07T22:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fuzzy find/kindex</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541429#M149477</link>
      <description>&lt;P&gt;Thanks, ChrisNZ!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I understand that kindex&amp;nbsp;could not be fuzzy.&amp;nbsp; I am asking if there are some functions that can be used to fuzzy matching.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 15:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541429#M149477</guid>
      <dc:creator>daradanye</dc:creator>
      <dc:date>2019-03-08T15:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fuzzy find/kindex</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541779#M149651</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;if there are some functions that can be used to fuzzy matching&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, but you have to define the rules yourself.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the example you give, you could try to simply use index() on strings that have been cleaned: uppercase, no punctuation, no "Ltd" "Inc" "Limited" etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Functions that do fuzzy matching include the &lt;EM&gt;like&lt;/EM&gt; and &lt;EM&gt;sounds like&lt;/EM&gt; operators in SQL, the regular expressions matches like function prxmatch(), and the spelling distance functions like spedis() or compged(). It is up to you to define the criteria though.&amp;nbsp; Each case is different.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Mar 2019 04:10:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fuzzy-find-kindex/m-p/541779#M149651</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-03-10T04:10:45Z</dc:date>
    </item>
  </channel>
</rss>

