Topic: Beginner Ruby Help

I'm typing in
           the string is "Everybody loves Ruby"; str.scan(/[a-1]/)

I get
           (eval):3: empty range in char class: /[a-1] /

What is wrong with what I put?

Re: Beginner Ruby Help

I think that you have to put character not a digit in your regex, for ex. [a-z]

Last edited by Javix (2010-12-23 04:34:29)