Hello,
Question;
Tree 1. : container containing text items
List 2.: List of textual ‘characters’ that have to be Replaced (note: these items can consists of more than 1 character)
Three 3: List of Replacement ‘characters’
Because there are multiple character that I would like to ‘Replace’ I found the - Replace text (multiple) - (Wombat plugin quit handy
Unfortunately I noted the following:
The component start comparing (and replacing) in order of list 2. (correctly).
However, as a result it is possible that the item that is ‘already’ replaced, is replaced ‘again’ because it contains a character that is ‘recognized & replaced’ is present lower in list 2.
Bottom line:
I would like to translate multiple items (which is possible whit the ‘replace text multiple’ component of wombat). However, when an item is ‘Replaced’, I would like to ‘fix’ this part, this so it not Replaced ‘again’…
Maybe something in python? (I am not a python expert)
2021-01-24 Replace text based on multiple characters.gh (15.4 KB)
See example above, Note: this is an simple example with numbers but the solution has to be generic/also applicable with Letters… (In this example to make it easy to follow the replacing number should be simply -1)
Any suggestions?
Thanks