Icon

08_​Example_​for_​Recursive_​Replacement_​of_​Strings

Recursive replacement in strings based on a replacement dictionary

In this workflow strings, defined in a replacement table (or dictionary) will be replaced in strings that are contained in a second data table in a recursive way. Therefor we used an recursive loop with two feedback ports.

Replacement Text Text Recursive replacement in strings based on a replacement dictionary In this workflow strings, defined in a replacement table (or dictionary) will be replaced in strings that arecontained in a second data table in a recursive way. Therefor we used an recursive loop with two feedbackports.Port1 is used for the text we want to transform. Port2 is used for the configuration table, hence the connection between umlaute an noumlaute. In everyloop run, we filter the first row and use this first row for the string manipulation. The other rows are feed backto the loop start. So in the folloing iteration the consequent row will be processed.However this configuration table is also used to end the loop. If less than 1 row (hence the datatable doesnot contain any rows) is passed to the loop end, the loop is stoped.The output of the loop end is the last iteration only of the first inport. However you can change this behaviorin the configuration to collect the data from all iterations. Advanced solution using recursive loops Exchanging the umlaute with their alternative form without loops replacement tablefirst rowsecond rowthird rowsome textcollect only last iteration from first inportsecond and third are passed back to the loop startget first row onlyconvert to varsumlaut -> no umlaut Table Creator Row Splitter Row Splitter Row Splitter String Manipulation Table Rowto Variable Table Creator String Manipulation Table Rowto Variable Table Rowto Variable String Manipulation Recursive LoopStart (2 ports) Recursive LoopEnd (2 ports) Row Splitter Table Rowto Variable String Manipulation Replacement Text Text Recursive replacement in strings based on a replacement dictionary In this workflow strings, defined in a replacement table (or dictionary) will be replaced in strings that arecontained in a second data table in a recursive way. Therefor we used an recursive loop with two feedbackports.Port1 is used for the text we want to transform. Port2 is used for the configuration table, hence the connection between umlaute an noumlaute. In everyloop run, we filter the first row and use this first row for the string manipulation. The other rows are feed backto the loop start. So in the folloing iteration the consequent row will be processed.However this configuration table is also used to end the loop. If less than 1 row (hence the datatable doesnot contain any rows) is passed to the loop end, the loop is stoped.The output of the loop end is the last iteration only of the first inport. However you can change this behaviorin the configuration to collect the data from all iterations. Advanced solution using recursive loops Exchanging the umlaute with their alternative form without loops replacement tablefirst rowsecond rowthird rowsome textcollect only last iteration from first inportsecond and third are passed back to the loop startget first row onlyconvert to varsumlaut -> no umlautTable Creator Row Splitter Row Splitter Row Splitter String Manipulation Table Rowto Variable Table Creator String Manipulation Table Rowto Variable Table Rowto Variable String Manipulation Recursive LoopStart (2 ports) Recursive LoopEnd (2 ports) Row Splitter Table Rowto Variable String Manipulation

Nodes

Extensions

Links