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

How to insert pipe (|) in a txt file?

BRDASID
5 - Atom

Hello community, how are you?
I need help inserting pipe (|) between characters in a large txt file and I believe it is possible with ease using Alteryx.
I am attaching examples of how the file is and how it should be.
Thank you in advance.

Daniela

2 REPLIES 2
Carlithian
11 - Bolide
11 - Bolide

Hey, so I think what you are wanting to do is just replace the whitespace with a pipe. This formula should do it for you, its taking any amount of whitepace and making it a pipe

 

REGEX_Replace([FieldName ], '\s+', '|')

 

If you then want your output to delimit it on the pipe, you can update that in the Output tool, outputting it as a csv and selecting | as the delimeter

 


Happy Alteryxing
BRDASID
5 - Atom

Hi, many thanks for your help.

I go to make with your recommended and return in here.

Labels
Top Solution Authors