How to remove list of words from strings
Posted
by zeljko
on Stack Overflow
See other posts from Stack Overflow
or by zeljko
Published on 2010-03-31T14:17:46Z
Indexed on
2010/03/31
14:33 UTC
Read the original article
Hit count: 393
What I would like to do (in Clojure):
For example, I have a vector of words that need to be removed:
(def forbidden-words [":)" "the" "." "," " " ...many more...])
... and a vector of strings:
(def strings ["the movie list" "this.is.a.string" "haha :)" ...many more...])
So, each forbidden word should be removed from each string, and the result, in this case, would be: ["movie list" "thisisastring" "haha"].
How to do this ?
© Stack Overflow or respective owner