@ptt-bds If you haven't come up with a workaround, the simplest way is already in your question.
You have given 3 possible cases, so you can use "Contains" in those 3 cases to search for results.
The data is processed instantly, so it won't take any more of your time.
There are many ways to deal with the problem, so do whatever you can to solve your problem.
I will suggest you a piece of code you can try.
article = [[DOCUMENT]]
keyword = [[KEYWORD]]
var regex = new RegExp("\\b" + keyword + "\\b", "gi");
if (article.match(regex)) {
[[STRING_CONTAINS]] = true
} else {
[[STRING_CONTAINS]] = false
}
[[DOCUMENT]] : The variable contains the text to be checked.
[[KEYWORD]] : Keywords to check
You will get the same [[STRING_CONTAINS]] result as using Contains.