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.
SOLVED

How to upper case first letters but not in case of articles (the, by, of, etc.)

FabioP
8 - Asteroid

Hello everyone!

 

Is it possible to upper case first letter of words but change (or keep) articles as lower case?

I'd like to know the which is the best way to transform the example below:

 

 

FromTo
CONCERT BY JOHN WINEConcert by John Wine
LUCCA THE WHITE SNAKELucca the White Snake

 

and

 

FromTo
jordan son of the kingJordan Son of the King
jade brown a big starJade Brown a Big Star

 

 

Many Thanks!

5 REPLIES 5
flying008
15 - Aurora

Hi, @FabioP 

 

A formula for you :

 

 

TitleCase([From])

 

录制_2023_07_25_14_37_05_382.gif

 

******

If can help you get your want, please mark it as a solution and give a like for more share.

 

caltang
17 - Castor
17 - Castor

@FabioP I've done something similar to @flying008 but with a bit more controls and takes into account the common words like "a", "the", "of", etc.

 

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
flying008
15 - Aurora

Hi, @FabioP  @caltang 

 

I'm fix the formula now, maybe you can try it again:

 

REGEX_Replace(TitleCase([From]), '(?<=\s)(a|an|by|of|the)(?=\s)', '\L$1')
caltang
17 - Castor
17 - Castor

Very cool man!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
FabioP
8 - Asteroid

Thank you Guys! (@caltang and @flying008)

It helped a lot...

Labels
Top Solution Authors