cancel
Showing results for 
Search instead for 
Did you mean: 

Full name split

LuckyRaju
Meteor

Full name split

I need to split the Full Name to First Name and Last Name.  First Name and Last name is separated with either space or any other Special character.  It should work for all the cased.  Can you please provide Regex FORMULA for the below. 

 

Full Name
TURNER, JANICE 
VAN, TAYLOR
BREAULT JASON 
LOOBY% CYNTHIA M

 

Full NameFirst NameLast Name
TURNER, JANICE TURNERJANICE 
VAN, TAYLORVAN TAYLOR
BREAULT JASON BREAULTJASON
LOOBY% CYNTHIA MLOOBYCYNTHIA M
6 REPLIES 6
LuckyRaju
Meteor

Full name split

I need to split the Full Name to First Name and Last Name.  First Name and Last name is separated with either space or any other Special character.  It should work for all the cased.  Can you please provide Regex FORMULA for the below. 

 

Full Name
TURNER, JANICE 
VAN, TAYLOR
BREAULT JASON 
LOOBY% CYNTHIA M

 

Full NameFirst NameLast Name
TURNER, JANICE TURNERJANICE 
VAN, TAYLORVAN TAYLOR
BREAULT JASON BREAULTJASON
LOOBY% CYNTHIA MLOOBYCYNTHIA M
ShankerV
Castor

Re: Full name split

Hi @LuckyRaju 

 

This can be achieved with the help of Text to Columns tool.

 

Many thanks

Shanker V

ShankerV
Castor

Re: Full name split

Hi @LuckyRaju 

 

Please find the use case explained for your scenario.

 

Screenshot 2023-07-18 223325.jpg

 

Many thanks

Shanker V 

Re: Full name split

Hi @LuckyRaju 

 

Step 1: Input the data

 

Step 2: Text to columns tool.

 

Screenshot 2023-07-18 223325.jpg

 

Screenshot 2023-07-18 223325.jpg

 

Step 3: Data Cleansing tool used to remove the white spaces

 

Many thanks 

Shanker V

Prometheus
Quasar

Re: Full name split

I think you can split the Full Name using a regular expression or you can do what I did and that's replace the comma with a space, remove extra spaces, then use the Text To Columns tool and parse on the space, which is "\s". Full Name Split.PNG

Attachment
Download this attachment
flying008
Aurora

Re: Full name split

Hi, @LuckyRaju 

 

RegEx tool parse method for you:

 

^([A-Z]+?)[^A-Z]+(.+?)\s?$

 

录制_2023_07_19_08_07_39_836.gif

 

caltang
17 - Castor

Re: Full name split

You can try:

(.+?),?\s(.+)

image.png

 

Add a Data Cleanse tool thereafter to remove whitespace and it'll be all good.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/