Say you have your list of URLs:
var urls = [ 'http://google.com/', 'http://example.com/', 'http://example.com/google'];
Retrieve the contents of the two inputs (I'm assuming you know how to do that; if not, look up the .value property), and use .indexOf to see whether the string is contained in the URLs. Clone the array, then cycle through it removing all elements which do not contain the "include" value and do include to "exclude" value. You'll end up with something like this:
var urls = [ 'http://google.com/', 'http://example.com/', 'http://example.com/google']; $('#include, #exclude').keyup(function () { var include = $('#include').val(), exclude = $('#exclude').val(), newUrls = urls.clone(); for (var i = 0; i < newUrls.length; i++) { if (newUrls[i].indexOf(include) === -1 || newUrls[i].indexOf(exclude) !== -1) { newUrls.splice(i, 1); i--; } }});
Untested. There are a number of improvements that could be made (such as only retrieving the .val() of the updated input, or looping backwards to remove the i--), so when you understand everything that is there, see what you can improve. EDIT: How do I do inline code?