In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Splitting string column by column width - but skipping positions

hrbarry
5 - Atom

I am trying to split a text file that is delimited by the "pipe" character "|"

 

Example:

|NO|Street    |ZIP   |Address2    |

 

The text to column tool works just fine except that there are rare occasions where a field of data actually contains the pipe and we do not want a split at this point.

 

Example:

|NO|Street    |ZIP   |Address | 3 |

 

We know the number of characters in each column (2, 10, 6 & 12 above) and began with a Regex (...)(...........)(.......)(.............)

 

We are still left with the pipe in the above of course and would then have to remove it as a leading character - is there a more elegant way to use regex or another tool to:

  • skip a character
  • create a two-char column
  • skip a character
  • create a 10 c
2 REPLIES 2
binu_acs
21 - Polaris

@hrbarry 

binuacs_1-1645569685912.png

 

 

hrbarry
5 - Atom

thank you.  the unpivot then pivot to get rid of the pipes was something i wouldn't have thought of!

Labels
Top Solution Authors