Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

REGEX TOOL - REPLACE METHOD

Tommy_Alterax
8 - Asteroid

 

Hi Guys,

 I want to use the REGEX TOOL replace function - I want it to review my sample column of data - In the same Column I want to remove all no numeric characters so i am only left with a number

 For example below "PIA" will be removed as will "*"  ----- There is no exact length of digits - The example below shows digits of 4 in length however, could be shorter longer

3 REPLIES 3
OllieClarke
16 - Nebula
16 - Nebula

Hi @Tommy_Alterax the following Regex will replace anything which isn't a number

REGEX_REPLACE([Field],'\D','')

Or in the regex tool just put '\D' in the regex box and leave the replacement box empty

 

Hope that helps,

 

Ollie

 

Tommy_Alterax
8 - Asteroid

Hi Ollie,

 

I'm specifically looking for the configuration of the Reg Ex tool replace option (not the formuale tool) - I couldnt get it working with your note on Reg Ex tool

Regards,

             Tommy

Qiu
21 - Polaris
21 - Polaris

@Tommy_Alterax 

It is basically same idea as proposed by @OllieClarke 

0414-Tommy_Alterax.PNG

Labels
Top Solution Authors