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 after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. 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

Help in Regex Expression

James89
7 - Meteor

Hi,

 

I am trying to split a string with the following format into 8 separate columns.

 

TEAM||Manchester|London||City|Derby|Number of Players|Man of the Match|Match Day

 

I have tried using Regex expression ([^|]*) as suggested doesn't work out that way. Any tips that could help solve this issue?

 

Thanks!

4 REPLIES 4
Deano478
12 - Quasar

hey @James89 this could be neater but this will do it for you

([^|]+)\|\|([^|]+)\|([^|]+)\|\|([^|]+)\|([^|]+)\|([^|]+)\|([^|]+)\|([^|]+)

 

 

OTrieger
14 - Magnetar

@James89 
It can be done also with the use of Text To Column tool, Using Pipe as the delimiter.

DataNath
17 - Castor
17 - Castor

Hey @James89, the following ought to work in the RegEx tool in Tokenize mode, splitting to 8 fields:

 

([^|]+)\|?
James89
7 - Meteor

Thanks @DataNath ! It really works.

Labels
Top Solution Authors