How to test if string contains on of the selected keywords?
For example
var keywords = 'small, big, large'
var string = 'big brown bear';
function wordInString(string, keywords){
return new RegExp( '\\b' + keywords + '\\b', 'i').test(string);
}
The above only works for a single word, I need to be able to test multiple words, and exact match.