In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

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
binuacs
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
19 - Altair

do you want them in the same field - if so - use something similar to @binuacs 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