This will work on 10px
or 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
This will work on 10px
or 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