Alteryx Designer Discussions

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

Text to Columns - Positional

eshimizu
5 - Atom

Hi,

 

I have data in a field that I need to separate into columns, but there are no delimiters in the field -- I want to parse the data based on the position in the string. Can someone help me?

 

Original data:

################## (total 18 characters)

 

Need to parse below:

### / ## / ## / ### / ##### / ###

3 / 2 / 2 / 3 / 5 / 3

5 REPLIES 5
bpatel
Alteryx
Alteryx

Hi @eshimizu,

 

You can use the regex tool to parse. the formula would be (...)(..)(..)(...)(.....)(...) hope that helps!

NickSm
Alteryx
Alteryx

@eshimizu 

 

Is it the same positions for each and every record?  If so, RegEx may be the easiest way to go.

 

Could use a RegEx tool with the Parse setting, and an expression of:

(.{3})(.{2})(.{2})(.{3})(.{5})(.{3})

 

Where the "." means any character, followed by the number of characters for that group.

NicholasM
Alteryx
Alteryx

Hey @eshimizu

 

I was working on the exact same thing @NickSm suggested. Great minds think alike. 

 

Regex.PNG

JosephSerpis
16 - Nebula
16 - Nebula

Hi @eshimizu you can do this using left, substring and right formulas. I mocked up a workflow.

eshimizu
5 - Atom

Perfect! Thank you!

Labels