I'm looking for a JS regex to match full words, but not to match at all if there is any different word (any failure).
Eg: Match for \b(dog|cat)\b
cat dog cat
--> everything is matched. OK.
dog
--> dog
is matched even if cat
does not exist here. OK.
dog cata
--> dog
is matched, cata
not. I don't want any match at all.