由:cgag 发布的评论
我不知道如何编辑,但我想包含一个简单的示例
CLJS
(clojure.string/replace "hello world" #"(hello) world" (fn (link: m) (.log js/console (str "Match: " m)) m))
将记录: "Match: hello world"
CLJ
user=> (clojure.string/replace "hello world" #"(hello) world" (fn (link: m) (println (str "Match: " m) m)))
Match: (link: "hello world" "hello") (link: hello world hello)
NullPointerException java.util.regex.Matcher.quoteReplacement (Matcher.java:655)