Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Text to Columns

sariyaj
7 - Meteor

Is there a way to use a certain word as a delimiter and keep that word. 

For example, if I am trying to separate a column using the word "city", can I do that and keep the actual word in the previous column.

Example:

 

from this:

Oklahoma City OK 12345

to this: 

Oklahoma CityOK12345  

 

it doesn't really work out if I put in a certain word as a delimiter.

Thank you for your help in advance!

5 REPLIES 5
FinnCharlton
13 - Pulsar

Hi @sariyaj , 

You can do this with the RegEx tool:

FinnCharlton_0-1673893150421.png

 

sariyaj
7 - Meteor

I'm sorry, I'm not familiar with the reg ex tool, I understand you used parse as you output method. But did you use marked group in your expression? Which expression helped you get to that solution?

FinnCharlton
13 - Pulsar

I've attached the workbook so you can have a look, the expression I've used is:(.+City)\s(.+?)\s(.+)

The marked groups are in brackets.

Also, there are plenty of RegEx tutorials online to help you understand what this expression is doing.

binuacs
21 - Polaris

@sariyaj One way of doing this

 

binuacs_0-1673897167304.png

 

sariyaj
7 - Meteor

Thank you guys!!

Labels
Top Solution Authors