title: Filtering exact words
body: <p>I have a filter that filters the letters found in the div, but I need it to filter the exact words as written in search and I just can't get it to work. Here's my code.</p>
  <pre><code>     $(document).ready(function(){
        $(&quot;#myInput&quot;).on(&quot;keyup&quot;, function() {
          var value = $(this).val().toLowerCase();
          $(&quot;#List li&quot;).filter(function() {
            $(this).toggle($(this).text().toLowerCase().indexOf(value) &gt; -1)
          });
        });
      });
  </code></pre>
  <p>This is the search field:
  <code>&lt;input id=&quot;myInput&quot; type=&quot;text&quot; placeholder=&quot;Search&quot;&gt;</code></p>
  <p>html for the card:</p>
  <pre><code>&lt;li&gt;
  &lt;div class=&quot;masonry&quot; id=&quot;List&quot; style=&quot;list-style-type:none;&quot;&gt;
  &lt;div class=&quot;column&quot; style=&quot;width: rem&quot;&gt;
      &lt;div class=&quot;col s12 m7 &quot;&gt;
        &lt;div class=&quot;card&quot;&gt;
          &lt;div class=&quot;card-image&quot; style=&quot;text-align: center&quot;&gt;
            &lt;img style=&quot;padding: 0.3em; &quot; src=&quot;#&quot;&gt;&lt;p1&gt;&lt;/p1&gt; &lt;/div&gt; &lt;---img src (p1 is the name of the town)
          &lt;div class=&quot;card-content&quot; style=&quot;color: black&quot;&gt;
            &lt;p1&gt;&lt;h6&gt;#&lt;/h6&gt; &lt;br&gt;  &lt;--- Title of the card
  &lt;i class=&quot;fas fa-map-marker-alt&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp; Vojni put 2.deo 293a, Zemun, Beograd&lt;br&gt;
  &lt;i class=&quot;fas fa-phone&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;011/408 5510; 065/403 7365 &lt;br&gt;
  &lt;i class=&quot;fas fa-envelope&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;dom.najmiliji@gmail.com   &lt;br&gt; 
  &lt;br&gt; &lt;br&gt;
  &gt;Text description of a column goes here&lt;        
  &lt;/p1&gt;
        &lt;/div&gt;
          &lt;div class=&quot;card-action&quot;&gt;
          
             &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;i class=&quot;fab fa-facebook-square fa-3x&quot; style=&quot;color: dodgerblue; &quot;&gt;&lt;/i&gt;&lt;/a&gt;
              
         &lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;&lt;i class=&quot;fab fa-internet-explorer fa-3x&quot; style=&quot;color:rgba(57,171,235,1.00); &quot;&gt;&lt;/i&gt;&lt;/a&gt;         
              
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt; 
  &lt;/li&gt;
  </code></pre>
  <p>So basically I need it to look for the exact sequence of letters in <li>.</p>
  <p>Search: ris</p>
  <p>Tet<strong>ris</strong> is ok,
  <strong>R</strong>epo<strong>s</strong>t<strong>i</strong>ng is not.</p>