pedestal

simongray 2020-12-08T07:36:19.287700Z

seems good enough to me. What’s wrong with using regex?

simongray 2020-12-08T07:42:16.287900Z

You could cut down a bit by using an inner group, I think:

(string/replace "/foo/{bar}/car/{var}"
                 #"(\{([^\}]+)\})"
                 (fn [[_ _ token]]
                   (str ":" token)))

simongray 2020-12-08T07:43:23.288100Z

then the function gets [full-match, outer-group, inner-group] as its input.