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

Regex/Formula Help

taliatest
7 - Meteor

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
10 - Fireball

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
7 - Meteor

Thank you - that worked great!

OTrieger
13 - Pulsar

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

Labels
Top Solution Authors