Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Split Text to 2 Columns with repeated delimiter

Adityasa
7 - Meteor

Hi,

I have a column that looks like this below:

 

XYZ - Mumbai - Apple

ABC - Delhi - Ball

DEF - Kolkata

GHI - Chennai

 

And I want to split the above column into two columns:

[Column 1]   [Column 2]

XYZ              Mumbai - Apple

ABC              Delhi - Ball

DEF              Kolkata

GHI               Chennai

 

So I want to use only the first dash as the delimiter. Can someone please guide me?

Thanks.

2 REPLIES 2
mpennington
11 - Bolide

You just need a RegEx Parse:

 

(.+?)\s-\s(.*)

 

Parse.png

AngelosPachis
16 - Nebula

Hi @Adityasa ,

 

Besides the method provided by @mpennington , you can also use a text to columns tool which is slightly easier to configure if you are not familiar with RegEx. You just have to define the delimiter and then the number of columns you are looking to create.

 

AngelosPachis_0-1616479699616.png

 

Cheers,

 

Angelos

Labels
Top Solution Authors