title: jQuery DataTables fnFilter: find the exact match of a string within a concatenated string
body: <p>I am using datatables and am trying to filter my table based on the presence of an ID in a hidden column.  The hidden column contains multiple IDs and they are delimited by "@" signs, e.g. @2311@11@3546@ (Note: the delimiter could be anything; we simply chose "@").</p>
  
  <p>When I pass in the categoryId as a var (filterValue) to the DataTables fnFilter, I get partial matches.  For example if my categoryId=1 it will match against "1", "11" and "2311".</p>
  
  <p>I want the categoryId to exactly match any of the numbers within the column, between (delimited by) the "@".  I'm pretty unfamiliar with RegEx which the fnFilter API supports and that I assume would be the best approach. I don't really have much productive code to share, unfortunately.</p>
  
  <p>Here's the function I have so far:</p>
  
  <pre><code>var oTable = $('#fundTable').dataTable(); //the dataTable object
  var filterCol = $("#table th.colCats").index(); //the index of the column to search in
  $('.product-filter').click(function() { //click a link to filter the data table
      var filterValue = $(this).attr('href').match(/categoryId=([0-9]+)/)[1]; //grab the cat ID from the link
      oTable.fnFilter(filterValue, filterCol, true, false); //use fnFilter API to pass in the value, the col index, regex true/false, smart filtering true/false 
      oTable.fnDraw(); //redraw the table using filter result
      return false; //don't activate anchor link
  });
  </code></pre>
  
  <p>And here's an edited version of the table I am using:</p>
  
  <pre><code>&lt;table id="fundTable"&gt;
      &lt;thead&gt;
          &lt;tr role="row"&gt;
              &lt;th&gt;
                  Fund
              &lt;/th&gt;
              &lt;th&gt;
                  Categories
              &lt;/th class="colCats"&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  Fund 1
              &lt;/td&gt;
              &lt;td&gt;
                  @23@2311@
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  Fund 2
              &lt;/td&gt;
              &lt;td&gt;
                  @123@4567@1234@
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I believe the DataTables API says you can use a regex expression in place of the value (filterValue).  I'm just not sure how to write it.</p>