I am currently trying to figure out how to solve the above named problem. Specifically I want to check if the string does not contain the word \"stream\" both in ca
I would prefer to use javascript RegExp like this:
function includesMatch(lookupValue, testString){
var re = new RegExp(lookupValue, 'i'); //Here the 'i' means that we are doing a case insensitive match
return testString.match(re) !== null
}
var lookup = "stream";
var test1 = "do I have a StrEAm in me?";
var test2 = "well at least I don't";
console.log(includesMatch(lookup, test1));
console.log(includesMatch(lookup, test2));