We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How do I use the regex replace formula to pull out all the numbers in a field?

dlee9
6 - Meteoroid

Hi all,

 

I have a column GL account where all the members are formatted like this: GL_12345_Account Name - Description. How do I use the regex replace to just pull out 12345 into a new column?

 

I thought it would be something like this but I'm not sure what the second variable "pattern" should be : regex_replace([gl account], pattern, "")

2 REPLIES 2
grazitti_sapna
17 - Castor

Hi @dlee9,

the formula that you are looking for is given below:

 

REGEX_Replace([FIELD_NAME],"[\D]","").

 

 

I hope it solves your issue.

 

 

Sapna Gupta
dlee9
6 - Meteoroid

Perfect, it worked! Thanks!

Labels
Top Solution Authors