Replace using wild card and flow variable

I have tired multiple ways to do this but it is not working see image below it will give more context. I have a master reference list in which I added “*” to both the start and end of the each string in the list. The column has a lot of useless information for example “8hd239-Tesco990jj”. The reference list will have “Tesco” so I must find all of them in the column and replace it with “Tesco”.

Thanks for all the help!

Welcome to the forum @AsadH.

What do you mean by “not working”?

Can you share this workflow and data?

At least can we see how the Column Expressions, Rule Engine, and String Replacer nodes are configured and what the outputs are?

1 Like

Sorry for not being clear. It does not search for a substring (in a specific column) and replace it with that substring. IS that clear? Unfortunately I am unable to share any data due to confidentially reasons. I can show you how I have configured each method.

Below is the configuration of the string replacer node I tried to use. It has two flow variables LAWYER_1 is what I want to replace it with, while LAWYER_2 is the same name but has “*” on either side (for example “Tesco”).


Based on your description, this workflow works for me:

It’s hard to say what’s going on in your case without seeing the data.

2 Likes

Interesting that is exactly what I did, do you think it may be due to the fact that my master refences list is a list rather than one value (your setup variable is only Tesco while I have 200+ rows and your data I have around 900+ rows) but I would think it shouldn’t cause a problem. Again sorry for not being able to show you the data.

Hi @AsadH,
with the Table Row to Variable node you will only get the first row of your master reference list as variable. If it contains more data, you could use a Table Row To Variable Loop Start node instead (in combination with a loop end) to do all replacements in a loop.

1 Like

Hi Daniela,
Thanks that makes a lot more sense. I have used the cell replacer node which works but has a very low accuracy.

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