=> (cljs.reader/read-string "(re-matches #\".*ClojureScript \\d+\\.\\d+\\.\\d+ (.*)$\")")
Error: Unsupported escape character: \d.
at new cljs$core$ExceptionInfo (/js/cljs-runtime/cljs.core.js:37198:10)
at Function.eval [as cljs$core$IFn$_invoke$arity$3] (/js/cljs-runtime/cljs.core.js:37259:9)
at Function.eval [as cljs$core$IFn$_invoke$arity$2] (/js/cljs-runtime/cljs.core.js:37255:26)
at Function.eval [as cljs$core$IFn$_invoke$arity$variadic] (/js/cljs-runtime/cljs.tools.reader.impl.errors.js:52:25)
at Function.eval [as cljs$core$IFn$_invoke$arity$variadic] (/js/cljs-runtime/cljs.tools.reader.impl.errors.js:92:47)
at Object.cljs$tools$reader$impl$errors$throw_bad_escape_char [as throw_bad_escape_char] (/js/cljs-runtime/cljs.tools.reader.impl.errors.js:321:51)
at Object.cljs$tools$reader$edn$escape_char [as escape_char] (/js/cljs-runtime/cljs.tools.reader.edn.js:470:38)
at eval (/js/cljs-runtime/cljs.tools.reader.edn.js:485:39)
at cljs$tools$reader$edn$read_string_STAR_ (/js/cljs-runtime/cljs.tools.reader.edn.js:488:3)
但相同的输入在 clojure 中
=> (read-string "(re-matches #\".*ClojureScript \\d+\\.\\d+\\.\\d+ (.*)$\")")
(re-matches #".*ClojureScript \d+\.\d+\.\d+ (.*)$")
还有
(cljs.reader/read-string "(re-matches #\"hello\")")
用 cljs.reader/read-string 读取失败,而 clojure 的 read-string 可以读取