Remove duplicates from a String
R, 84 bytes



function(s,w,S=el(strsplit(s," ")),t=tolower)cat(S[!duplicated(x&lt;-t(S))|!x%in%t(w)])


Try it online!

Less than 100 bytes on a string challenge that's not also kolmogorov-complexity?

Explanation:

After we break up the string into words, we need to exclude those that are


duplicates and
in w


or alternatively, turning that on its head, keeping those that are


the first occurrence of a word OR
not in w.


duplicated neatly returns logical indices of those that are not the first occurrence, so !duplicated() returns indices of those which are first occurrences, and x%in%w returns logical indices for x of those which are in w. Neat.