Include a space between a lower case letter and an upper case letter
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
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
Solved! Go to Solution.
- Labels:
- Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MarqueeCrew
Thank you for this, and for providing a breakdown/explanation of the syntax. Solved!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What would the formula be if there are three words I am trying to separate with spaces - all starting with capital letters?
