['1.22','1,22','$1.22',22$','$1.22']
我需要删除除数字之外的所有字符,并且..所以我需要得到一个总是可以解析为Float的值.
a.map {|i| i.gsub(/[^\d,\.]/,'')} # => ["1.22","1,22","1.22","1.22"]