Alteryx Designer Desktop Discussions

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

Parse to columns every 2 char (including white space)

dlesny
8 - Asteroid

Hello

I have a data in column which I would like to parse every 2 char.

Data represents days in a week every 2 char. It could be empty or have two letters code.

I need to split it to columns like that:

SatSunMonTueWedThurFri
ACACACACAC  
 SH     
 SH     
  VAVA   
 NSNS NSNS 
NS ASASNSNSAS

 

ACACACACAC 
    SH       
    SH        
      VAVA   
  NSNS    NSNS
NS  ASASNSNSAS
    NS         
NS           
      VAVA   

4 REPLIES 4
jdunkerley79
ACE Emeritus
ACE Emeritus

You can use a RegEx tool in tokenize mode to get 2 characters and make this a field.

If you specify it to have 7 fields should get what you want

jdunkerley79_0-1573056848215.png

 

Quick sample attached

Ladarthure
14 - Magnetar
14 - Magnetar

Hi @dlesny,

 

you can use a simple regex to do so, just use the tokenize function in the regex tool and the correct regex is ".." one "." for each character, then specify you want 7 columns!

echuong1
Alteryx Alumni (Retired)

You can achieve this using regex to identify a pattern. In this case, I identified sets of 2 (either an actual character/digit or a whitespace). Let me know if this works for your purpose! 

dlesny
8 - Asteroid

Thank you very much, perfect

Labels