JSFiddle - React, Tailwind, and code Playground

by Derek Wallace

HTML

<script src='http://cdn.datatables.net/1.10.5/js/jquery.dataTables.min.js'></script>


Search the table with a regular expression. e.g. "^5"
It will work.
<table class='' id='Table0' cellspacing="0" width="">
<thead>
   <tr class='Title'>
      <th>Col0</th>

   </tr>
</thead>
<tbody>
   <tr>
      <td><a href='www.1234.com' title='X GT 0'>555 warnings</a></td>
   </tr>
   <tr>
      <td><a href='www.1234.com' title='X GT 0' >666 warnings</a></td>
   </tr>   
   <tr>
      <td><a href='www.1234.com' title='X GT 0' >777 warnings</a></td>
   </tr>     
   <tr>
      <td><a href='www.1234.com' title='X GT 0'>888 warnings</a></td>
   </tr>    
</tbody>
</table>  

<br>
<br>
<br>

Search the table with a regular expression. e.g. "^5". It will NOT work. The title attribute has the greater than symbol.<br>
If you try "^....5" it will work. So there are 4 chars before the 5.<br>
If you try "^ 0.>5" it will work. This sort of proves it is wrongly matchin the \&\gt\; as the close tag.<br>
<table class='' id='Table1' cellspacing="0" width="">
<thead>
   <tr class='Title'>
      <th>Col0</th>

   </tr>
</thead>
<tbody>
   <tr>
      <td><a href='www.1234.com' title='X &gt; 0'>555 warnings</a></td>
   </tr>
   <tr>
      <td><a href='www.1234.com' title='X &gt; 0' >666 warnings</a></td>
   </tr>   
   <tr>
      <td><a href='www.1234.com' title='X &gt; 0' >777 warnings</a></td>
   </tr>     
   <tr>
      <td><a href='www.1234.com' title='X &gt; 0'>888 warnings</a></td>
   </tr>    
</tbody>
</table>

JavaScript

$(document).ready(function () {

    $('#Table0').DataTable({
      "search"       : {
                       "regex": true
                       }
        });
    
    
    $('#Table1').DataTable({
      "search"       : {
                       "regex": true
                       }        
    });
});