Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Help cleaning up phone number to extract area codes

aven
5 - Atom

A newbie to Alteryx here!

 

Looking for a way to clean up phone numbers and then extract the 3-digit area codes excluding any character, spaces and country code starting with 1

Ex: (342) 456- 6789  to get 342

16043308811 to get 604

 

Thanks in advance!

Aven

4 REPLIES 4
fmvizcaino
17 - Castor
17 - Castor

Hi @aven ,

 

Attached is a solution showing how to parse your code with the parse method from regex tool.

fmvizcaino_0-1586304151050.png

 

 

Best,

Fernando Vizcaino

AbhilashR
15 - Aurora
15 - Aurora

Hi @aven, you could retrieve the area codes using Formula tool or Regex tool, whichever you are comfortable with. Attached solution is an implementation using the Formula tool approach. 

Hope this helps!

aven
5 - Atom

This worked perfectly. Thanks a million @AbhilashR 

aven
5 - Atom

Thank you @fmvizcaino. For some reason, a few of the records from the output was extracting numbers middle of the 10 digit phone field.

Labels