Check if word is present in a paragraph

Hey guys,

I'm looking at the best way to check if a list of words is present in a variable.

Let's say I have this text:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.

I want to check if this text has ANY of those words: lorem, amet, elit.

if any of those words are present (could be just 1 or multiple words), return as true, else return false

Thanks!

6 replies