My question is about function clojure.string/split. One can specify maximum number of splits for the function, and it works like a charm:
user> (clojure.string/split "1{1,2{3,4},5}6" #"\{" 2)
;; => ["1" "1,2{3,4},5}6"]
However, the function traverses the string from left to right. Sometimes I want it to traverse a string form right to left (from end):
user> (clojure.string/split "1{1,2{3,4},5}6" #"\}" 2)
;; => ["1{1,2{3,4" ",5}6"]
;; desired result: ["1{1,2{3,4},5" "6"]
How can I achieve it using regex?