One Column, 100 rules, String Replace

I need to edit tens of thousands of lines of text.
There are more than 100 rules, and after making the rules into a table, I want to solve them through a concise loop.

Below are some samples and the result I want to get

Source Result

(A)_naem#1 name#1
BR_name#2 name#2
GR_name#3 name#3
name#4_LNT name#4

Hi Alex, Column Expression can be used to populate multiple rules in one node. I would try 3 rules and see if they produce the output you expect. Here is an example workflow.

If this does not help, please attach a workflow and some sample data (even fake data is fine) so we can investigate your issue further. Thank you!

2 Likes

If you know all the rules, you could try rule engine dictionary and avoid using loops
br

3 Likes

I tried using the loop statement as shown below.

(upload://a7jM74fztP8EoV2IpTCfB1hEnMz.knwf) (13.5 KB)

The result is that it is repeated as much as the size of the column, and string replace is only partially applied.
I also tried “Recursive loop” and got similar results.
Rule Engine cannot be used because it cannot replace string.
[One_Column.100Rule.StringReplace.knwf|attachment]

I found the answer.
I solved it with the link below.

3 Likes

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