Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Removing Unwanted Character

hprice
6 - Meteoroid

I've discovered some phone numbers in our database with unwanted characters included. Wondering the best way to remove these characters. Sample of what I'm seeing is included in the post.

 

 
 

 

4 REPLIES 4
MilindG
12 - Quasar

@hprice You can use Data cleansing tool. Please see the attached workflow

hprice
6 - Meteoroid

Unfortunately I have already tried the data cleanse tool and it doesn't remove these particular characters. I should add this is a string, not numeric value.

Luqman
7 - Meteor

Formula tool

REGEX_Replace([your collumn], "[\D]", "")

 

It uses regex to replace anything that is not a digit with a blank string.

MarqueeCrew
20 - Arcturus
20 - Arcturus

@hprice 

 

RegEx can identify anything not a decimal "\d" with "\D".

 

REGEX_Replace([stuff], "\D", '')

 

This will get rid of stuff not in {0,1,2,3,4,5,6,7,8,9}

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors