In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parse Initials

CPAul
7 - Meteor

RegEx questions here... From a listing of names, I'm trying to parse out all instances where an initial is used, for example:

 

John T. Smith             =       John Smith

J. Thomas Smith        =       Thomas Smith

John Smith                 =       John Smith

John Thomas Smith   =      John Thomas Smith

 

Thank you!

Paul

3 REPLIES 3
Emil_Kos
17 - Castor
17 - Castor

Hi @CPAul,

 

Probably you can do it in a more elegant way but this should work for you.

 

What I am doing here is looking for one letter with a dot after it. I am removing those with the data.

 

Emil_Kos_1-1610382306825.png

The output:

 

Emil_Kos_0-1610382298429.png

 

 

echuong1
Alteryx Alumni (Retired)

This is easily achievable with regex. In the expression, I am looking for an instance of a letter followed by a period. I am replacing it with nothing, thereby removing it.

 

I added a data cleansing to remove any leading and trailing spaces, should the initial be at the beginning or end. I also removed duplicate whitespace, for instances of the initial in the middle.

 

echuong1_0-1610382282133.png

 

ponraj
13 - Pulsar

Here you go. Hope this is helpful. 

 

Workflow.PNG

Labels
Top Solution Authors