Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81689

Filtering jQuery Datatable using Regular Expression

$
0
0
Hi Allan,

I was checking how the global filter of a jQuery Datatable works. I entered a filter criteria as 'il oh'. I was then going through the jQuery library file and found that _fnFilterCreateSearch creates a regular expression of the form ^(?=.*?il)(?=.*?oh).*$
This seems to do an AND search over the table data i.e. all the rows containing both 'il' and 'oh' were rendered. I wanted to know how we can modify this regex pattern in order to do an OR search i.e. all the rows containing either 'il' or 'oh' should be rendered.

Viewing all articles
Browse latest Browse all 81689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>