I've got a set of numbers like this: 333 22 66 44 8821
If I search for '333 66' it will give me the above result as the string contains 333 and also the 66 somewhere in the string. (I don't want this)
What I'm trying to achieve is for the above example not to work. Basically if I would be searching for 333 22 I am supposed to have that show and only that one.
An exact search would work if I would write "333 22"(this works but I want to remove the need of using double quotes)
What I'm using is next:
$('.dataTables_filter input').unbind().bind('keyup', function() {
var searchTerm = '"'+this.value.toLowerCase()+'"',
regex = '\\b' + searchTerm + '\\b';
table.rows().search(regex, true, false).draw();
})
Any ideas? thank you.