In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more 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