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

Add Spaces between Words

arsh011
8 - Asteroid

I want to add spaces between words example if my word is "babyhealthcare", I want to convert the string into "baby health care" ,

how can I do this,please help !!!!

6 REPLIES 6
Raj
16 - Nebula

is there a specific format for every row? or this is changing?

Kindly share some sample rows to understand the requirement correctly.

BS_THE_ANALYST
15 - Aurora
15 - Aurora

@arsh011 ;
This is the best way I can think to do it. It reminded me of Weekly Challenge #75 where we use a Dictionary as a lookup table:

BS_THE_ANALYST_0-1677662187588.png

It won't work 100%, but it should do alot of the work for you. Attached the workflow

 

 

All the best,
BS

LinkedIN

Bulien
BS_THE_ANALYST
15 - Aurora
15 - Aurora

Could use this workflow if you wanted to rejoin the sentence together:

BS_THE_ANALYST_0-1677664080802.png

 



 

All the best,
BS

LinkedIN

Bulien
arsh011
8 - Asteroid

@Raj sample file : 

arsh011
8 - Asteroid

thanks @BS_THE_ANALYST  perfect solution!! but can we do it without Find and replace tool, I don't want to use any external input (for e.g - words.txt)

BS_THE_ANALYST
15 - Aurora
15 - Aurora

@arsh011 potentially we can do it without a Find and Replace tool. Basically, we need a way to detect the difference between each of the words:

1) because they are all lower case i.e. "fishbluetable" I needed to attach a dictionary to it to find each word. Because each word can be found by hooking the string up to a dictionary, we can therefore seperate it. Kind of similar to this: "fish-blue-table" we could just separate it by the delimiter "-".
2) if the words are like this "FishBlueTable". We wouldn't even need a find and replace tool. I can clearly see we need to split apart at every Capital letter i.e:

BS_THE_ANALYST_0-1677676994646.png


Unfortunately, if the words are all lowercase, I can't think of a way to split them apart without a dictionary.

All the best,
BS

LinkedIN

Bulien
Labels
Top Solution Authors