Free Trial

Alteryx Designer Desktop Discussions

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

Clean up repeated digits in a number

Paddi
8 - Asteroid

Hi all, 

 

I need to clean up some numbers and find any numbers with repeated digits such as "1123456", "1234456", or "111119" .

 

Do you know how I could do that? 

 

Thank you so much

 

6 REPLIES 6
Par_O
7 - Meteor

Paddi, this is somewhat tricky as the repeats are of different lengths. However, it looks like a good opportunity to get acquainted with RegEx. Find the RegEx tool under the Parse palette and get some great ideas to find repeat patterns here. Also use the RegEx101 page to easily develop and test the script before moving it to the RegEx tool in Alteryx.

grazitti_sapna
17 - Castor

@Paddi , You can use tokenize feature in regex to achieve your desired output. Please find the workflow below:

 

grazitti_sapna_1-1668485014046.png

 

Sapna Gupta
ShankerV
17 - Castor

@Paddi 

 

Wanted to check whether you got the solution expected or if not.

 

Please help me understand your question better.

How you need your output, 

1. Whether you need to remove the repeated digits from the input

2. You want to keep the digits the repeated digits, still populate in another column what is the repeated digits

 

Both above solution needs different approaches, based on your expectation I can support.

 

 

Many thanks

Shanker V

Paddi
8 - Asteroid

@Par_O Thank you for your advice.

Paddi
8 - Asteroid

@ShankerV 

 

Hihi Shanker,

 

I want to keep the digits the repeated digits, still populate in another column what is the repeated digits.

 

Thank you.

Paddi
8 - Asteroid

@grazitti_sapna 

 

Hihi Sapna,

 

Your solution is very helpful, thank you so much.

Labels
Top Solution Authors