I have various strings, some like \"45\", some like \"45px\". How how I convert both of these to the number 45?
This will work on 10px or px10
10px
px10
(defn parse-int [s] (Integer. (re-find #"\d+" s )))
it will parse the first continuous digit only so
user=> (parse-int "10not123") 10 user=> (parse-int "abc10def11") 10