Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Row/String contains atleast 1 digit then true

wonka1234
10 - Fireball

hi,

 

How can I make a formula that will return true if a string has atleast a digit?

 

REGEX_MATCH([col],'\d*')  , doesnt seem to work.

 

Thanks.

4 REPLIES 4
BrandonB
Alteryx
Alteryx

Try this:

 

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

BrandonB
Alteryx
Alteryx

That means zero or more of any character followed by one or more digits followed by zero or more of any character

Mchappell67
9 - Comet

Hi, @BrandonB -

 

Would REGEX_Match([Field1], "\d+") be equivalent to what you posted?

 

Thanks,


Mark

BrandonB
Alteryx
Alteryx

Hi @Mchappell67 

 

It is close, but it doesn't account for characters before and after the digit. REGEX_Match is looking for a specific pattern so if you have it looking for just one or more digits, it isn't accounting for what is before or afterwards. Your solution would work if it was a cell with only digits. 

Labels
Top Solution Authors