Alteryx Designer Desktop Discussions

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

Contains digit regex

wonka1234
10 - Fireball

Hi,

 

I have a formula to tell me if a column contains a digit:

REGEX_Match([CODE], ".*\d+.*")

 

 

So i have codes such as "p3sf" so It contains digit. So it would be a true for codes with a digit. would be false for a code "abcd"

 

However I have 2 codes that shouldnt be "contained as a digit"

For example: salesforce.com - (00d300001g8w) should not be included in the contains digit. same with "invoice_consumer_ 962255191"

 

All but these codes of my are lower then 10 characters.

 

How can I alter my regex to exclude these 2 fields? 

 

Thanks.

7 REPLIES 7
faiqz
8 - Asteroid

hi @wonka1234 

 

please take a look at the workflow attached to see if my workflow can cater your problem.

 

Thank you

wonka1234
10 - Fireball

@faiqz  Sorry your excel file does not work. Its more of a regex issue and identifying digits.

Qiu
20 - Arcturus
20 - Arcturus

@wonka1234 
What is the cretiria here?

Why  salesforce.com - (00d300001g8w) can be as containing "digit"?

@faiqz 
Maybe you uploaded the different workflow? 😂

q1.PNG

wonka1234
10 - Fireball

@Qiu 

I think my regex is recognizing the bracketed digits , which is correct givne the current regex. However I need a way to exclude it/. I want to exclude the "CODE" > 10 characters(or anything other logic you can think of).. but I want to keep my  original regex as is for the determining digit or not as it seems to work good.

 

 

Qiu
20 - Arcturus
20 - Arcturus

@wonka1234 
Thank you for the quick reply.
If we can exclude any text that having length of greater than 10, then maybe something like.
Hope I understand you correctly. 😁

0417-wonka1234.PNG

wonka1234
10 - Fireball

@Qiu 

 

Thanks. However my formula is already a bool type.

Can you make this into a true false type of statement?

 

 

Qiu
20 - Arcturus
20 - Arcturus

@wonka1234 
We can use 0 and 1 for Boolean type data.

0417-wonka1234-1.PNG

Labels