SOLVED
Regex Parsing
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Alteryx
‎05-10-2020
07:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 | |
1 | Abc XYZ |
2 | XYZ Abc |
3 | Abc XYZ Def |
4 | Abc Def XYZ |
Cleansed Data:
Name | Last Name | First Name | |
1 | Abc XYZ | XYZ | Abc |
2 | XYZ Abc | XYZ | Abc |
3 | Abc XYZ Def | XYZ | Abc Def |
4 | Abc Def XYZ | XYZ | Abc Def |
Solved! Go to Solution.
Labels:
- Labels:
- Expression
- Regex
4 REPLIES 4
15 - Aurora
‎05-10-2020
08:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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],'')
‎05-10-2020
11:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
16 - Nebula
‎05-11-2020
01:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎05-11-2020
06:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Works fantastic!!! Thank you for your help!!
