Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

contains multiple strings?


i read this -


but what i need is something like :


contains([field1], "mustang" or "fiesta" or "f150") to change a set of values, based on the value of a field, in this case, the nameplate field or do i have to do:

Contains([field1],"mustang") OR





Alteryx Partner

You could instead use something like:


REGEX_Match([Field1], 'mustang|fiesta|f150')

Let me know if you have more questions about building the regex, or if this doesn't work for you.




thanks.  can you use that with a formula tool so I can change the value of the field [wheelbase] based on values in the field [nameplate]?  thanks



REGEX_Match([nameplate],"Mustang"|"Figo") doesn't work, even If I use 'Mustang' or double quotes.  the error , in the formula tool is "unknown operator "|", did you mean "||"? and if I put that in, then I can't change the field "wheelbase" in formula since it's a numeric. 

Alteryx Partner

Yes, you'd want to enter an expression something like:


IF REGEX_Match([Field1], 'mustang|fiesta|f150')
THEN Value1
ELSE Value2

This should do what you want. If you can provide a sample of data I could try to put an actual example together.


Let me know if you need further help setting this up.

Alteryx Partner

You want the | character inside the quotes. 


The second argument should be a single string, with things you want to look for separated by |.


The | (pipe operator) is used to mean the logical OR operation.


thanks!  and duh, I need to read for context not for speed!