Currently I have this:
const illegals = [/Foo/, /Bar/, /FooBar/];
var testTxt = "Foo Fighter";
var isMatch = illegals.some(rx => rx.test(testTxt));
and since the testTxt contains 'Foo' it returns true. But I only want to match if it matches the full text (i.e. 'Foo Fighter') otherwise return false. What have I got wrong here?