Alteryx Designer Desktop Discussions

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

Parsing a string in two columns

sriniprad08
11 - Bolide

Hi Team,

Hope you are well.

I need help. The below text1 to be split two columns.

 

Please find attached and let me know how to go about this,

 

Thanks,

Sri

sriniprad08_0-1678699743548.png

 

12 REPLIES 12
ShankerV
17 - Castor

Hi @sriniprad08 

 

One way of doing this.

 

ShankerV_0-1678700132125.png

ShankerV_0-1678700211325.png

 

 

Many thanks

Shanker V

sparksun
11 - Bolide

sparksun_0-1678700700039.png

 

binuacs
20 - Arcturus

@sriniprad08 Another option to split the string

binuacs_0-1678700842672.png

 

sriniprad08
11 - Bolide

Hi @ShankerV 

thank you so much . Really appreciate it.

 

Cheers,

Sri

sriniprad08
11 - Bolide

Hi @sparksun ,

 

Thank you. Really appreciate it.

 

Cheers,

Sri

sriniprad08
11 - Bolide

Hi @binuacs ,

 

thank you . Really appreciate it.

 

Cheers,

Sri

Ian-MacLeod
5 - Atom

A way of doing this would be to use the RegEx Tool.

Select 'Parse' in the Output box.

Column to parse - column name.

Format to convert:

several options

1.  ([a-z]+\s[a-z]+-[a-z]+)-(\d{6})

 broken down into English () brackets denote a part of the string that you want in a new column.

[a-z] is any lowercase letter, + is one or more of what precedes it, in this case a-z's,

\s is a single whitespace,

- is literal, that is, the hyphen, after this is the closed bracket for the end of the first column you require.

the hyphen outside the bracket is the second hyphen and is not returned as a column as it's not in brackets.

The 2nd column to return is \d which denotes any digit, followed by {6}.  The brace bracket is specifying how many, in this case, 6.  If the number of digits vary then \d+ should be used.

 

RegEx is well worth learning.

Use https://regex.com to test what result you will get when learning or experimenting for use in a workflow.

 

sriniprad08
11 - Bolide

Great thank you @Ian-MacLeod  Appreciate that. I will work on this.

 

Cheers,

Sri

sriniprad08
11 - Bolide

Hi @ShankerV ,

 

Thanks for your help. Really appreciate that.

Is it possible to split the same text into three columns.

 

Please let meknow,

 

Cheers,

Sri

 

sriniprad08_0-1678738660629.png

 

Labels