Hi,
I am having a hard time deleting the last comma of a string. Regex should work with
replace($column1$, "(.*),", "")
in a String Manipulation node.
However nothing happens if I use it like this. Any idea? Thanks for your help!
Hi,
I am having a hard time deleting the last comma of a string. Regex should work with
replace($column1$, "(.*),", "")
in a String Manipulation node.
However nothing happens if I use it like this. Any idea? Thanks for your help!
Hi @Awiener
You could use the following trick here as follows:
This should do the trick:
replace( trim( replace( $your string$, ",", " ")), " ", ",")
Hope this helps.
Best Ael
PS: I’m answering from the smartphone so sorry I cannot provide you with a workflow as example.
Hello @Awiener
First of all, the string manipulation function has to be regexReplace()
As you are trying to replace excluding the comma, and you already defined a capturing group (brackets), then the capturing group should be the repacement “$1”.
Summarizing.
I’m not in a computer right now (answering from mobile as well), but you can test the following expression:
regexReplace($column1$, "(.*),", "$1")
BR
Thanks @gonhaddock, that’s it!
and thanks to @aworker, sounds great too.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.