We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Extract Title from string

ramanm43
6 - Meteoroid

Hi All,

 

Hope someone is able to assist.

 

I have a list of names from which I need to separate the title, first name and surname. Some of these records do not contain a title which makes things a lot more difficult.

 

Below is an example of the data:

 

Name
MR P J Morrisey
MR Tom McCarthy
MRS Mary Monks
 Jack O'Driscoll
MR Tom Dunne
MS Anne-Marie Rath
MR Eric  Scott
Michael Healy
MR Kieran McGovern

 

Appreciate any help.

 

Thanks

 

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @ramanm43 

 

Here is how you can do it.

Workflow:

atcodedog05_2-1628852087959.png

 

Edit: updated with few fixes

 

Hope this helps : )

HomesickSurfer
12 - Quasar

Hi @atcodedog05 

 

Love it!

 

@ramanm43 , perhaps consider modification to the expression to additionally include the following as either start or end to name strings, w or w/o the periods.

 

Dr. (Doctor)
Esq. (Esquire)
Hon. (Honorable)
Jr. (Junior)
Msgr. (Monsignor)
Prof. (Professor)
Rev. (Reverend)
Rt. Hon. (Right Honorable)
Sr. (Senior)
St. (Saint)

atcodedog05
22 - Nova
22 - Nova

Hi @ramanm43 

 

Thats true as @HomesickSurfer said you might have to identify all titles first 😅.  Hopefully its only Mr, Ms, Mrs 🙂

Labels
Top Solution Authors