Alteryx designer Discussions

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

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

Highlighted
Meteoroid

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

Alteryx Certified Partner
Alteryx Certified Partner

@arundaka01 

 

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 reboot. Order shall return.
Highlighted
Asteroid

@MarqueeCrew 

 

Thank you - this is awesome to use!

Highlighted
Meteoroid

@MarqueeCrew

 

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

Labels