ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. 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

Keep First Letter after Comma

GustavoP
5 - Atom

Hello! Reaching out for help. I have the following set of data:

 

Name

Smith,John

Lopez,Mark

 

I need to change into:

 

J. Smith

M. Lopez

 

Suggestions? Thank you

3 REPLIES 3
jrgo
14 - Magnetar

This formula should get you what you need assuming that ALL your records are formatted exactly the same as your example.

 

 

REGEX_REPLACE([Name], '^(.+?),(\w).*$', '$2.$1')

 

jrgo_0-1619105209469.png

 

GustavoP
5 - Atom

Thank you! This was what I needed

MarqueeCrew
20 - Arcturus
20 - Arcturus

Hey @GustavoP ,

 

Let's try:

 

Regex_Replace([Name],"(.*?),\s*(\w).*",'$2. $1')

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors