If activity: check if strings contain multiple words

Hi,

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

HI,

Hope the following helps you.

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

Then

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

image

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.

Regards,

1 Like

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