Alteryx Designer Desktop Discussions

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

Regex Parsing

ChrisTan
Alteryx
Alteryx

Hi, i am trying to parse out the first name and LAST name of this list of data. As i'm new into regex, the best i can get to is the below. Any help to complete the workflow is greatly appreciated. 

Attached the workflow that i have

 

Current Data:

 Name
1Abc XYZ
2XYZ Abc
3Abc XYZ Def
4Abc Def XYZ

 

Cleansed Data:

 NameLast NameFirst Name
1Abc XYZXYZAbc
2XYZ AbcXYZAbc
3Abc XYZ DefXYZAbc Def
4Abc Def XYZXYZAbc Def
4 REPLIES 4
AbhilashR
15 - Aurora
15 - Aurora

Hi @ChrisTan, not sure if this is what you were looking for but I took your regex output and used a Replace function to fetch the Last Name.

Replace([Name],' '+[RegExOut1],'')

 

AbhilashR_0-1589168502488.png

 

ChrisTan
Alteryx
Alteryx

Hi, the results is only good for some of the records. Somehow it doesnt work for others:

 

e.g: Chris TAN will return the same results for First Name

ChrisTan_0-1589180306209.png

 

PhilipMannering
16 - Nebula
16 - Nebula

This might do the job..

 

 

ChrisTan
Alteryx
Alteryx

Works fantastic!!! Thank you for your help!!

Labels