String Repalcer

I have data table like this.
In the category column I only care about the values after final “-”.
Result would look like this.
I tried cell splitter but didn’t work. String replacer might be useful but I don’t know how I can use that for this problem.

In string Manipulation node use IndexOf() function with modifier b to find a position of last “-”.
Use this position in Substring() function to get the rest of the string.


Something like this : substr($column1$,(lastIndexOfChar($column1$,’-’ ))+1 )

1 Like

Sorry HansS, but it is giving me a msg “Unable to compile expression”.

Hi @Tushar_07, Oeps sorry for that. It worked on my machine in one String Manipulation node. Here is a simple workflow in two steps (But I guess a one step Regex split is also possible.) string_split.knwf (13.0 KB). Hope this helps.


1 Like

In one node from your example - substr($Chain$,lastIndexOfChar($Chain$,’-’ )+1 )

1 Like

Hi @Tushar_07,

This expression in a String Manipulation node will do what you want:
regexReplace($Chain$, ".*-", "")


Thank you @armingrudd

1 Like

Thank you @HansS

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.