I am really new to ruby and want know if it's possible to check if a string contains only positive numbers using regex or some other function?
str = "123abcd" #return false because it contains alphabets
str = "153" #return true because of all numbers