We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Spliting rows from file

Luk88kk
8 - Asteroid

Hi,

Could you please help me with the split lines in the file.

I have tried using the Text To Columns Tool and RegEx but it still does not work for me.

 

It is:

File_name
PART_1_ADAM
PART_1_ADAM
PART_1_TOM
PART_1_TOM
PART_1_LUCAS
PART_1_LUCAS
PART_1_LUCAS
PART_1_LUCAS
PART_2_AMANDA
PART_2_AMANDA
PART_2_ANDREW
 

Should be:

File_namePartPerson
PART_1_ADAMPART_1ADAM
PART_1_ADAMPART_1ADAM
PART_1_TOMPART_1TOM
PART_1_TOMPART_1TOM
PART_1_LUCASPART_1LUCAS
PART_1_LUCASPART_1LUCAS
PART_1_LUCASPART_1LUCAS
PART_1_LUCASPART_1LUCAS
PART_2_AMANDAPART_2AMANDA
PART_2_AMANDAPART_2AMANDA
PART_2_ANDREWPART_2ANDREW

 

 

5 REPLIES 5
aatalai
15 - Aurora

@Luk88kk take a look at the attached workflow it should do the trick, let me know how you get on.

Krzysiek
8 - Asteroid

Parse output method in RegEx should be useful:

 

If you always have got upper case

(\u{4}_\d{1})_(\u+)

 

and here case non sensitive, same result

 

([[:alpha:]]{4}_\d{1})_([[:alpha:]]+)

 

Capture.PNG

Raj
16 - Nebula

@Luk88kk 

both the methods attached below
hope this help.

jdminton
13 - Pulsar

I would suggest slightly different RegEx to make it more dynamic. This RegEx will look for a number followed by the underscore to parse and not be too specific about what comes before. This could be important if more underscores or other characters show up in the beginning part of the string. Also, it won't break if a different character aside from uppercase letters appears in the name. 

Snag_1e3e41b3.png

Luk88kk
8 - Asteroid

Hello,

thank you very much for your support, everything works great!

Labels
Top Solution Authors