Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

International Phone number formating

pvara
8 - Asteroid

I am curious if anyone has some macro that can identify and format a phone number into the International format. I am working on a CRM database with over 200 various countries and the phone number field is pretty clean in terms having the having the country code and number. However the ask is to "Text to Columns" for further analysis. For example:

USA Phone Number (11 Char)

17145551212

or

UK Phone Number (12 Char)

441234555555

 

Country CodeArea CodeNumber  
17145551212  
441234555555  

 

Any Suggestions would be great.

 

Thank you

12 REPLIES 12
pvara
8 - Asteroid

Hi,

I could use some help on this sample phone number parsing exercise. I have attached sample number of how its shows in a CRM. I would like it to match on all if possible.

My expression so far is

(11?)(\d{3})(\d{3})(\d{4})

 

7146513632
17146513632
117146513632
714651
171465136325
171465136326963

 

The above expression works on all but 2. Any suggestions on how to include the first number? I tried using an | but it did not work. Any fancy expression would be greatly appreciated.

SophiaF
Alteryx
Alteryx
(1*)(\d{3})(\d{3})(\d{4})

This leaves the first column Blank, instead of Null, but it pulls the rest out accordingly. I can see this potentially causing issues if you have area codes that start with a 1 (not sure if there are any?)

Sophia Fraticelli
Senior Solutions Architect
Alteryx, Inc.
pvara
8 - Asteroid

Hi @SophiaF

Thank you for your response. This really helped advanced my project.

Labels