str = "Czech Republic,CZK,139,000.00" str.gsub(/[^\d\.,]/, '').gsub(/^,+/,'') # => "139,000.00"