jQuery "not contains" selector

Solution 1:

Assuming your user's text is stored in a variable called userString:

$(':not(:contains('+ userString +'))').hide(); 

will hide all of the elements not containing that string.

Edit: If you have control over the elements in the list items, you could transform the user's text when you store it in the userString var.

Solution 2:

Let say that you want the list of all <td> that dont contains string 'Dinesh'.(assuming Dinesh is inside name Attribute)

$('tableId > tbody > tr > td').not("[name*='Dinesh']")