I want to check if a variable is in any of a set of words. For example
'Guava'.match(/b(apple|mango|orange)b/ig);
The above does not match, which is correct.
'AppleA'.match(/b(apple|mango|orange)b/ig)
This too does not match. Again correct.
'Apple.A'.match(/b(apple|mango|orange)b/ig)
This however returns a match, which is not what I want. How do I fix this?