Hi,
not sure if i fully understood your intended outcomes, however the string manipulation node allows you to concatenate column values, , so itās a matter of preparing a table with a domain column and whatever values you have.
If you have an example of the source data and the intended outcome we could help further.
thanks alot for your answer
i mean i have many (N) URL the difference is only in one mini String
is there any (one) Node to fill with www.host.domain/* the next Node
shall replace the * sign with the suitable String ?
Node 1 has one row --> www.host.domain/*
Node 2 has 3 rows
xxx
yyy
zzz
through the iteration in the second Node will build the whole URL ?
then with Get Request Node read each URL resource.
the problem all Nodes for manipulting a String could replace one and only one sign (*) in many rows
what if i have many different signs need to replace them with different String?
Java Snippet has the following code:
String url = $column0$;
if (url.contains(āaspā)){
return url.replace(āaspā, āaspirinā);
}else if (url.contains(āgluā)){
return url.replace(āgluā, āglucoseā);
}else{
return url;
}
Ok, i think i get you, you want a kind of āFind and Replaceā node, that can iterate through all possible values in the string and replace accordingly.
You can use a series of String Replacer nodes. Itās easier to manage than a java snippet.
You can also try looping around this to iterate around a number of find replace terms.
thanks alot as i know each Replacer Node can replace only one sign thats mean for each
String i need one Replacer Node ? (String Replacer Dictionary may be is the solution)
i muĆt have a better look at how to iterate through Strings with Knime Node ?
if you have any Workflow it will be nice in any case thank you so much.
I think this should do what you are after. find-replace.knwf (37.0 KB)
Similar to your idea of using the java snippet, in this case, i used a lookup table. The values are āgroupedā into a list,then appended to each row.
The java snippet then loops through each list value replacing as necessary.
It is quite crude, but should do the job
very nice i tried with String Replacer(Dictionary) but it does not work canāt replace part of URL
it replaces the whole URL but not a sign like * or ?
i will download your workflow and test it thanks alot.
i need to create 3 Nodes the suggestion with Rule Engin was OK it filters the String but i am not sure if the String Manipulation Node would be work with more than one expression because i got canāt complie Error ?