Skip to main content
Solved

How to replace spaces with commas?


I have tried using string replacer to remove the blank spaces with commas but it doesn't seem to work? Screenshot 2021-03-26 at 11.58.54 

I am hoping to get this attribute looking like the below? Any help on how to get here is appreciated.Screenshot 2021-03-25 at 09.51.35

Best answer by inge

If you use an AttributeSplitter with the comma as a delimiter character, it should work. This Transformer would allow you to drop empty parts. That would eliminate the multiple comma issue.

FYI, he AttributeSplitter has a list as output. Hope this helps!

View original
Did this help you find an answer to your question?

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

How do you have your StringReplacer set up? Can you post a screenshot of the parameters?


In the text to replace window I did: (*space*)- will this work?Screenshot 2021-03-26 at 12.14.46


redgeographics
Celebrity
Forum|alt.badge.img+49
lottielbrowne wrote:

In the text to replace window I did: (*space*)- will this work?Screenshot 2021-03-26 at 12.14.46

No, that will look for the combination ( ), which doesn't occur in your text. Simply putting just a space there should do the trick.


redgeographics wrote:

No, that will look for the combination ( ), which doesn't occur in your text. Simply putting just a space there should do the trick.

Great that worked but now i seem to have some with multiple commas? Screenshot 2021-03-26 at 12.19.21 


is there a transformer that is best to use to now get those values into separate columns?


inge
Contributor
Forum|alt.badge.img+3
  • Contributor
  • Best Answer
  • March 26, 2021

If you use an AttributeSplitter with the comma as a delimiter character, it should work. This Transformer would allow you to drop empty parts. That would eliminate the multiple comma issue.

FYI, he AttributeSplitter has a list as output. Hope this helps!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings