I have 2 regexps in ruby. The first regex is for letters and digits something like:
letter_digits = /^([0-9]*[a-zA-Z][a-zA-Z0-9]*)$/
With this regex if I write only digits 564521 does not match!
However I have this regex for only digits:
only_digits = /^([0-9])*$/
But with this regex if I write s45xo does not match!
I need only 1 regex valid for both letters/digits and digits.