If activity: check if strings contain multiple words


Under If activity, how to check if strings contain multiple words. For instance, i need to check if strings contain the following words, “Bear”, “Deer” and “Dog”. If all present, return true.

Hi @flyingdragon
stringname.Contains(“Bear”) and stringname. Contains(“Deer”) and stringname.Contains(“Dog”) this should be you condition. If this returns true then you string contains all three string

1 Like


Hope the following helps you.

keywords = {"Bear","Dear","Dog"}


keywords.All(Function(s) yourString.Contains(s))


If you need to evaluate it case insensitive the following will work

    keywords.All(Function(s) yourString.ToLower.Contains(s.ToLower))

note: keywords is string array type.


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.