def is_a_number?(s)
s.to_s.match(/\A[+-]?\d+?(\.\d+)?\Z/) == nil? false : true
end

By Jason

Leave a Reply

Your email address will not be published. Required fields are marked *