Provide multiple strings in contains() in an expression


#1

I want to write an expression like contains(slot.id, ['A', 'B', 'C', ...])

c3ShowType(ExpressionEngineFunction) shows that contains(str1, str2). Is there a way to provide a list? Or do I have to do contains(slot.id, 'A') || contains(slot.id, 'B') || contains(slot.id, 'C') || ...


#2

Look at matchesRegex. You can use something like matchesRegex(slot.id,’(A|B|C)’)