Getting hard time to make a regex for “OR” condition work.
Example: table has 2 columns and trying to serach on 2nd column ( let’s say – “status” column) and search regex is :
//javascript
$('#filter-status').change(function() {
searchTxt = "Not Shared|Private";
<table name>.dataTable().fnFilter(searchTxt , 2,true);
}
Looks like it is pulling up data with “Not Shared” as status bu not pulling up data with “Private” status.
Even tried with searchTxt as “^(Not Shared)|(Private)$” and “/(^Not Shared$)|(^Private$)/
“
Not sure what I am missing. Can anyone help?
Found out it was not Regex issue. But Jquery dataTable().fnFilter smartsearch issue. I just had to make the 4th argument
falseand it worked.