Solved

How to replace spaces with commas?

  • 26 March 2021
  • 6 replies
  • 62 views

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

icon

Best answer by inge 26 March 2021, 13:29

View original

6 replies

Userlevel 5
Badge +25

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

Userlevel 5
Badge +25

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.

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?

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