I need to delete some contents at the end of a string (eq_code) using Clojure. I want to implement a regex initialized by a variable (get-in vector [3 1]).
Maybe macro would have helped me.
Here is the code :
(reset! atom_code (clojure.string/replace eq_code #(str (get-in vector [3 1])) ""))
The error is :
IllegalArgumentException Invalid match arg: project.core$interpreted_lang_while$fn__4457@7ac4b7c5 clojure.string/replace (string.clj:102)
Is there a way to replace a substring without using macro ? For example using a function that return a regex.
#(str ...)tostr/replace.