Specter fills in the holes in Clojure's API for manipulating immutable data, allowing data manipulation to be done concisely and with near-optimal performance. Specter is especially powerful for working with nested and recursive data.
Specter 1.0.5 adds `regex-nav` which navigates to substrings matching a regex. For example:
(transform (regex-nav #"<[a-zA-Z]*>") (comp str count) "Match 1 length: <m>, Match 2 length: <match>")
;; => "Match 1 length: 3, Match 2 length: 7"
Regexes implicitly convert to `regex-nav`, so the above can be written as:
(transform #"<[a-zA-Z]*>" (comp str count) "Match 1 length: <m>, Match 2 length: <match>")
The other highlight of the release is adding implicit keypath navigation for all primitive types. Now you can write code like:
(select-any [0 "a" 1] [{"a" [1 2 3]} :b :c])
;; => 2
(transform ["a" 'b \c] inc {"a" {'b {\c 1}}})
;; => {"a" {b {\c 2}}}