How to extract a point separated number format from a string?
for example a string like this
a = 'ProductX credit 1.000'
how to to get only the 1.000 from that string?
Thank you kindly
You can use method split by space in ruby
split
space
a = 'ProductX credit 1.000' a.split(" ").last
Result
"1.000"
2.1m questions
2.1m answers
60 comments
57.0k users