Free Trial

Alteryx Designer Desktop Discussions

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

Regex/Formula Help

taliatest
6 - Meteoroid

Hi Everyone,

 

I am attempting to split a string from one column into three separate columns. Can anyone please advise on the best method to achieve this?

 

Example of current column value:

Marketing (John Smith / 0000)

 

Desired output:

Column 1: Marketing

Column 2: John Smith

Column 3: 0000

4 REPLIES 4
CoG
14 - Magnetar

Regex Tool configured to Parse will do what you need:

Screenshot.png

 

The Regex expression: (.*)\s\((.*)\s/\s(\d*)\)

I bolded each group that you are parsing:

Group 1: All characters prior to space followed by open parenthesis.

Group 2: All characters after open parenthesis, but before '/' (I assumed that you have spaces on both sides of the '/')

Group 3: All digits after the '/'

 

Hope this helps and Happy Solving!

Gumsmenezes
9 - Comet

Hi there!

 

Add the Regex Tool

Set the Configuration:

Choose the column that contains the string you want to split
Set the Output Method to "Parse."
In the Regular Expression field, use the following pattern: ^(.*?)\s\((.*?)\s\/\s(.*?)\)

taliatest
6 - Meteoroid

Thank you - that worked great!

OTrieger
12 - Quasar

@taliatest 
An additional way, to those that not familiar with Regex will be Text to Columns tool, select (/) as delimiters.

Labels
Top Solution Authors