Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Parsing multiple items from string

ltensmeyer
8 - Asteroid

Hi,

I'm trying to find a way to take the dependents names out of this block of text:

 

Doe, John - coverage was changed on [date] , new coverage effective [date] Doe, John - (Employee) coverage Added Doe, Jane - (Spouse) coverage Added Doe, Jill - (Child) coverage Added Doe, Jack- (Child) coverage Added Doe, Jackie - (Child) coverage Added

 

I need to take the names of the children and spouse and make them separate items. I've been trying to use regex to do this but I'm still a bit new and i'm not sure how to best do this. Any ideas?

 

5 REPLIES 5
IraWatt
17 - Castor
17 - Castor

Hey @ltensmeyer,

Just so I can understand the problem a bit better could you give an example of what you would expect the outcome to be in table format? 

ltensmeyer
8 - Asteroid

image.png

 

This is the final result I'm looking for. The important part is just separating each individual into a new row.

IraWatt
17 - Castor
17 - Castor

Hey @ltensmeyer,

Here is one way:

IraWatt_0-1668801821058.png

You can parse the employee with this regex:

(.*?) -

Gets everything before the first space and dash.

 

Then tokenise to rows and get dependent and relation in a column together:

coverage Added (.*?)\)

This gets everything between coverage added and the next curvy bracket.

 

If you want to learn more about Regex the community has some really quick interactive videos on getting to grips with it here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Parsing%20...

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

 

ltensmeyer
8 - Asteroid

This worked perfectly. Thank you so much for your help!

IraWatt
17 - Castor
17 - Castor

No worries @ltensmeyer! have a good one 😄

Labels