Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to move columns containing numbers into new column?

John_CMO
7 - Meteor

I have a column I need to parse job numbers from. 

 

I have several job numbers that can vary in length and contain both numbers and letters, but always start with numbers. 

 

555SSS0123

444AAA3210

409SSS4444

 

I'd like to be able to add in a formula or RegEx tool to recognize these numbers move them to a new column. 

 

Thanks

7 REPLIES 7
davidskaife
14 - Magnetar

Hi @John_CMO 

 

You can use the Formula tool to create a new column, and use the following code to strip out letters and move the numbers only:

 

Regex_replace([Field1],'[[:alpha:]]','')

 

John_CMO
7 - Meteor

Sorry, no I want to keep those numbers intact. There is other data in that column (customer names, payment types, ect.) So I want to pull those job numbers out and move to a separate column 

alexnajm
18 - Pollux
18 - Pollux

@davidskaife is still right then - put this formula into a new column instead of overwriting an existing one. Or maybe I am misunderstanding

davidskaife
14 - Magnetar

Ahhh ok, think i understand - try this Regex in the Regex tool as Parse output method and see if it works with your data:

 

(\<\d+\w*)\s

 

John_CMO
7 - Meteor

To clarify - 

 

I have several rows in a column with this format, I just want to pull 555SSS0123 out into it's own column

 

Job Number

Customer PAGE1234 / P AGE LLC Type: Paypal Phone: 123 123-1234

555SSS0123

 

 

davidskaife
14 - Magnetar

If it always is on a row by itself, and only contains that code then try ^(\d+\w*)

John_CMO
7 - Meteor

That worked! Thank-you.

Labels
Top Solution Authors