1. Please refrain from bumping your topic so often, you clearly stated your request in a previous post, there is no need to repost with no added information 10 minutes later. The only thing you might achieve is to deter people that may help you.
2. Most people here don't mind helping people who are obviously stuck, but will mostly ignore those who are blatantly lazy and don't even care to read the links given them.
Is it possible to limit the input upto two digits using regex
3. Which brings me to the point: Have you even read _in full_ the link Simon gave you? There is a box called "Quantifiers", with which you can specify the number of occurrences of a certain pattern in your regex. Please go read up on that, or for that matter on any of the top results google yields for "ruby regex" or something like that, and if you still have problems understanding what is written there, come back and ask, if you are just too lazy to make even that little bit of research for yourself, then please stay away from this forum, thank you.