Check for a Single word in a String (JS)

So I’ve got this string:

This was a sentence

Now I want it to to check if the word ‘is’ is in the sentence.
Using most methods e.g.


("is" in Sentence)

It will output as ‘true’, because it is looking at the word “This” and getting the “is” from that.

How would I get it so it only matches to whole words seperated by spacing?


Use Regex.Match with word boundaries.