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

Split column based on any 5 digit number

Fernström
6 - Meteoroid

Hi

 

I have a file with address information that i need to split into separate columns

 

Two examples:

 

Sannadalsvägen 16 lgh 1002 11765 Stockholm SE

Sätersvägen 9 19267 Sollentuna SE 

 

If I could split it based on any 5-digit number, I think i could sort the rest out.

 

Like this:

 

Column1                                             Column2

Sannadalsvägen 16 lgh 1002             11765 Stockholm SE

Sätersvägen 9                                    19267 Sollentuna SE

 

Is there a way to split a column based on any 5-digit number?

 

2 REPLIES 2
JosephSerpis
17 - Castor
17 - Castor

Hi @Fernström you can if you use Regex I have mocked up a workflow that showcases that approach. The syntax (.*?)(\d{5}.*) will first find everything up to five digits and place into one column denoted by (.*?). Then (\d{5}.*) will find five digits and place everything else after the five digits into a second column.

 

Regex_27012021.JPG

Fernström
6 - Meteoroid

Works perfect! Thank you so much!

Labels