Alteryx Designer Desktop Discussions

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

Parsing a number

Aleksandar1
7 - Meteor

I need to separate the number 205123456789999911 into 3 parts, according to the principle of the first 3 characters, then the next 13, then the last 2, but I encounter a problem when this part of 13 characters has less than 13 because it is entered by the end user,my workflow later adds a 0 in front of the middle number to get 13 characters, any advice is welcome

I know that I extract the first 3 and the last 2 characters using the left and right formula, but I don't have a solution for this in the middle

10 REPLIES 10
ShankerV
17 - Castor

Hi @Aleksandar1 

 

Are you expecting the result like below?

 

ShankerV_0-1684829857044.png

 

(\d{3})(\d+)(\d{2})

 

ShankerV_1-1684829869141.png

 

 

Many thanks

Shanker V

Aleksandar1
7 - Meteor

My input is 205-1234567899999-11 after that I use the data cleaning tool to make it 205123456789999911 and connect it to regex as you put it but I don't get the result

binuacs
20 - Arcturus

@Aleksandar1 Something like below?

binuacs_0-1684831554372.png

 

Aleksandar1
7 - Meteor

I run into a problem when the middle number is less than 13 characters and then it doesn't work

binuacs
20 - Arcturus

@Aleksandar1 If the middle number less than 13 you want to left pad with 0's?

Aleksandar1
7 - Meteor

I already did that later in workflow,but my problem is parsing when middle number has less than 13 characters

ShankerV
17 - Castor

Hi @Aleksandar1 

 

One way is to use Text to columns tool directly.

 

ShankerV_0-1684832730969.png

ShankerV_0-1684832824467.png

 

 

Input was:

ShankerV_1-1684832747732.png

Many thanks

Shanker V

Aleksandar1
7 - Meteor

I know about that with text to columns,but problem is when end user enter number without - or white space like this 205123456789999911 and middle number has less than 13 characters

binuacs
20 - Arcturus

@Aleksandar1 Updated the workflow and attached

binuacs_0-1684833451684.png

 

Labels