Delete last occurence of a substring

Hey, how can i delete the last occurence of a substring in another string?

E.g:

Input 1: test,

Output 1: test

 

Input 2: a,b,

Output 2: a,b

Thank you!

 

Hi New2Knime,

 

You can use a String Manipulation node with two options: 

1. Use the substr function: substr($String$, 0, length($String$)-1)

2. Use the regexReplace function: regexReplace($String$, "\\,$", "")

 

Please find attached a sample workflow. 

 

Best,

Anna