Allow input to be in the output of Find and Replace

Is there a way to add the original value to the output of the Find and Replace? I want to find text, replace it with something else, then append the original token. I guess I have to send it to a Combine node.

It’s great that you have all these nodes but I suggest allowing us to put the input token in the output field along with the replace text (just like a regex allows) so that we don’t have to complicate our flow by adding nodes for simple things like that.

Cheers,
André

Hey @AangelHD – I think you should still be able to do this with the Find & Replace node, can you share your workflow with an example?

Eg, in this run I added quick and replaced lazy with very & quick in the original sentence.

The quick brown fox jumps over the lazy dog.The very quick brown fox jumps over the very quick dog.

That works with hardcoded strings. It doesn’t work when the replacement token should be the same as the find token that is passed as an input—because it’s not possible to use the token in the output format.

Say I’m looking for “Input1” in the find:
“Created report for [Input1]”

and I want the output to be:
“Nicely done, [Input1]”

Ah I see yeah that would require a Combine Text node. This makes sense, we could potentially make the Find and Replace fields dynamic inputs.

This is a QOL (quality of life) improvement :grinning_face:

1 Like

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