Alteryx Designer Desktop Discussions

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

Split string into multiple rows

MonaAlmutairi
8 - Asteroid

Hello everyone,

 

I'm trying to split a string to rows based on two conditions:

 

1- Each row value should start with 6

2- And have a length of 10 chars.

 

Example: 

 

Before:

612345689760012255876000011111

 

After:

6123456897
6001225587
6000011111

 

Is there any way to do that? or even a way to insert a space or delimiters after every 10 digits that starts with 6?

 

Thank you all!

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @MonaAlmutairi 

 

You can Regex tool tokenize method with below regex to split.

 

atcodedog05_0-1662272442472.png

 

6 followed by 9 digits

 

Hope this helps : )

atcodedog05
22 - Nova
22 - Nova

Hi @MonaAlmutairi 

 

You can learn more about Regex from the below links

https://community.alteryx.com/t5/Interactive-Lessons/Parsing-Data-with-RegEx/ta-p/441415

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

 

In addition to the above resources, you can use https://regex101.com/ as a sandbox for building and testing out regex. The tool is very intuitive for step-by-step regex building.

atcodedog05_0-1662272580774.png

 

This should help you get started with the amazing journey of Regex 🙂

 

Hope this helps : )

MonaAlmutairi
8 - Asteroid

@atcodedog05 Thank you so much, that was helpful!

MonaAlmutairi
8 - Asteroid

@atcodedog05 Thank you for the great resources and guidance! I appreciate it😊

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @MonaAlmutairi 

Cheers and have a nice day!

Labels