Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

finding multiple strings

becki
8 - Asteroid

is there a best/fastest way to find multiple strings in one field?  is "contains" faster than "=" and is there a function where  you can list the field once and all the strings you're looking for, in the field?

 

thanks

 

becki kain

7 REPLIES 7
Hakimipous
10 - Fireball

What I would do is in a loop, looking like

Contains ([Field], "x")

OR

Contains ([Field], "y")

OR

....

That way with a simple copy/paste you can gain some time 

becki
8 - Asteroid

but is there a way of listing the field once and multiple strings?

Hakimipous
10 - Fireball

something like Regex could help then, If you are not familiar with it I recommend you to first : 

 

- Check that link https://community.alteryx.com/t5/Data-Preparation-Blending/RegEx-Examples-12-Handy-Use-Cases/td-p/36...

 

- Take a look at the live training 

Hakimipous
10 - Fireball

@becki 

 

Just did a test, you can build an expression looking like : .*[ae].* in the RegEx tool (using match mode)   (What is between the [ ] are the character you are looking for)

 

Here is an attached workflow for you to take a look at

 

that way you don't have to list your field more and once 

 

Then you can filter and the true value to get a clear view of what you are looking for

 

hope that helps

becki
8 - Asteroid

thanks

 

cwilcoxmtn
7 - Meteor

Thanks for this link!!!  So useful in working through/learning RegEx!!

Hakimipous
10 - Fireball

My pleasure x)

 

RegEx is one of the most powerful Data Cleaning tool once you learn how to use it

Labels