Hello, good afternoon, is there a node or formula to buy two columns and indicate the matches in words. example.
Thank you.
Hello, good afternoon, is there a node or formula to buy two columns and indicate the matches in words. example.
Thank you.
Hi @Gfranco2021
I created this wf matches_text_in_string.knwf (66.6 KB).
Somethings tells me it should be done with less nodes. But anyway see if this helps you out.
Excellent, thank you very much HansS.
Hello @Gfranco2021,
I have designed a small workflow to achieve the desired result. Please refer to the attached image of the workflow. Additionally, configure the Java snippet node with the provided code.

"Set set1 = new HashSet<>();
Set set2 = new HashSet<>();
Set intersection = new HashSet<>();
String words1 = c_CAMPO1.split(" “);
String words2 = c_CAMPO2.split(” ");
for (String word : words1) {
set1.add(word);
}
for (String word : words2) {
set2.add(word);
}
intersection.addAll(set1);
intersection.retainAll(set2);
String data = intersection.toArray(new String[0]);
out_new=String.join(" ", data); "
Result:

Very well, thank you very much.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.