String replacer / manipulator - multiple outputs

Hi all,
I’m trying to build a flow which will manipulate a string by replacing a recurring character multiple times, each time producing an output in which only 1 character has been changed.

e.g. my input would be: XFTFRZUF

I want to change each occurence of “F” to “56”, but only one per new string

i.e. leading to the follwing output:

X56TFRZUF
XFT56RZUF
XFTFRZU56

Any idea if this is possible?.

Second question:
I can think of a more complex flow which could do this with multiple string replacers and concatenate nodes, but only if I can find a way for the string replacer to only change the First example of a charachter
i.e. input = XFTFRZUF
String replacer “F” to “56”
Desied output: X56TFRZUF
Any idea how to do this i.e. only replace the first occurence of a character in a string

Thanks for any advice!
B

Hello,
Does this help?
replace_one_f_at_a_time.knwf (99.5 KB)

Hi @BPerry

This workflow is for your first question but you can use row filter in it and get answer of second question.
KNIME_project11.knwf (9.1 KB)

GL,
Mehrdad

2 Likes

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