Alteryx Designer Desktop Discussions

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

Include a space between a lower case letter and an upper case letter

arundaka02
8 - Asteroid

Hello, 

 

I'm new to Alteryx and after using a number of 'ReplaceChar' formula to remove unwanted characters in my data and I've ended up with the following:

 

arundaka01_0-1579802652632.png

Essentially I want to add a space between the lower case letter and the upper case letter, with a view to using the 'Text to Columns' tool to separate City and County in my dataset. 

 

Assuming the solution will lie in the Formula tool?  

 

Thanks,

KA

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@arundaka02 

 

I used:

 

REGEX_Replace([CityCounty], "(\u\l+)(\u.*)", '$1 $2',0)

to solve your challenge.

 

it takes the first group of 1 uppercase plus multiple lowercase letters and adds a space before the next uppercase letter.

 

Cheers,

 

Mark 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
jacob_kahn
12 - Quasar

@MarqueeCrew 

 

Thank you - this is awesome to use!

arundaka02
8 - Asteroid

@MarqueeCrew

 

Thank you for this, and for providing a breakdown/explanation of the syntax. Solved!

SabrinaPaoli
5 - Atom

What would the formula be if there are three words I am trying to separate with spaces - all starting with capital letters?

Labels