I have multiple articles that require multiple find-and-replace operations. I used the Replace function in the String Manipulation node, but it updates the rows one by one. Instead, I need all replacements for each article to be applied collectively so that the final output keeps each article in a single row.
I’ve attached an example workflow below to illustrate my goal more clearly. Any suggestions on how to achieve this in KNIME would be greatly appreciated. Thanks!
Article Find and Replace.knwf (6.9 KB)
Try this. You’ll need to put your terms into a table to feed the String Replacer (Dictionary) node.

4 Likes
Did the workflow I posted work for you?
1 Like
Thank you! I’m currently working with an older version of KNIME that doesn’t include the String Replacer (Dictionary) node, but this makes perfect sense. I really appreciate the help!
What version of KAP are you using? Are you under corporate constraints which prevent you for upgrading to the latest 5.x version? If so, sorry; if not upgrade.
1 Like
I’m using version 4.7.8. I tried the String Replace (Dictionary) node, but it only works with exact matches. Do you have any other suggestions? Thanks for your help!
You didn’t mention this before. Do you have some examples of non-matching terms you’d like to use? Also how big are your potential article/term lists? This is probably doable with a fuzzy search, but could get very complicated. In fact if there is very little similarity between the original and replacement terms its going to be impossible to get meaningful results.
Attached is an example of the issue I encountered when using the dictionary. The problem isn’t that the terms don’t match — it’s that the replacement only works when the term is the only content in the cell. Since the bodies of my articles are long, I need something that can find and replace multiple instances within a single cell / article body.
Article Find and Replace V2.knwf (14.5 KB)
I’m fairly certain the problem is the limitation of the deprecated node you’re using. As you’ve observed it will only replace exact matches. The new KAP 5.x version obviously works as you can see from the screenshot I posted. Is there some reason you can’t update you KAP?
1 Like
We encountered various limitations with the newer version that we need to address before proceeding with the update. In the meantime, do you know of any other solutions or workarounds that could help resolve the issue? Thank you again for your help - it’s much appreciated!