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
Solved! Go to Solution.
Regex Tool configured to Parse will do what you need:
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!
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(.*?)\)
Thank you - that worked great!
@taliatest
An additional way, to those that not familiar with Regex will be Text to Columns tool, select (/) as delimiters.