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

Regex Expression

Bryth
8 - Asteroid

Hello Team, 

 

I want a regex Expression that will take only the first name in this attached text and the initial ( First letter to the second name) of the name in the text. Can you help me with this please

 

Bryth_0-1684270408851.png

 

4 REPLIES 4
binu_acs
21 - Polaris

@Bryth Something like below?

binuacs_0-1684270779337.png

 

flying008
15 - Aurora

Hi, @Bryth 

 

Maybe like this is your want ?

 

flying008_0-1684282319042.png

 

apathetichell
20 - Arcturus

do you want them in the same field - if so - use something similar to @binu_acs suggestion like:

regex_replace([Trainee],"^(\w+\s\w).*","$1") 

RobertOdera
13 - Pulsar

Hi, @Bryth 

 

Yes, to REGEX, but also you can do the below.

I hope that you find it helpful - Cheers!

 

1. Add a Formula Tool

2. First part is given by the formula GetWord(TRIM([Field]),0)

3. Second part is given by the formula LEFT(GetWord(TRIM([Field]),1),1)

 

Labels
Top Solution Authors