re = /([-+]?((\d*\.\d+)|(\d+))([eE][-+]?\d+)?)/
str = ', , , \\n 62.5,-8.0-.9-.45-.39, , , .8654098.9-849.7849727799997-58.02000000000001,\\rM-849.7849727799997 54.375 , \\t\\r-846.1399727799996-54.375-846.1399727799996-54.375,.9-.90-7-841.6599727799997-54.375,-837.1799727799998-58.02000000000001, t0,-833.5349727799997-62.5,-833.5349727799997-66.97999999999997,\\n-833.5349727799997-70.625,-837.1799727799998-70.625,-841.6599727799997-70.625,\\r-846.1399727799996-66.98,-849.7849727799997-62.5,-849.7849727799997'
# Print the match result
str.scan(re) do |match|
puts match.to_s
end
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html