更新时间:2023-11-06 18:46:40
(def forbidden-words [":)" "the" "." ","])
(def strings ["the movie list" "this.is.a.string" "haha :)"])
(let [pattern (->> forbidden-words (map #(java.util.regex.Pattern/quote %))
(interpose \|) (apply str))]
(map #(.replaceAll % pattern "") strings))