SyntaxFix
Write A Post
Hire A Developer
Questions
If someone is looking to sub out more than a comma I'm a fan of:
"1,200".chars.grep(/\d/).join.to_i
dunno about performance but, it is more flexible than a gsub, ie:
gsub
"1-200".chars.grep(/\d/).join.to_i