I want it to return 450 in some way, the $1 is just a silly variable name. It's like the reverse of format. What is the clojure regex magic for achieving this?
(re-something #"$1\sUSD" "450 USD")
user=> (re-find #"(\d\d\d) (USD)" "450 USD")
["450 USD" "450" "USD"]
user=> (nth *1 1)
"450"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With