From: Elliot Temple Date: 2006-07-11T04:03:51+09:00 Subject: Re: Real newbie question about methods On Jul 10, 2006, at 12:00 PM, Une b�vue wrote: > studlee2@gmail.com wrote: > >> valid = /\d{2}/ #checks for exactly 2 digits > > this woundn't help because of gets.chomp returns always strings and > gets.chomp.to_i returns Fixnum with 0 in case of any alpha betic > char in > gets... so check the regex before the to_i need anchors though or "hi24" will pass -- Elliot Temple http://www.curi.us/blog/