m/\A (?: [1]\d+ # if it starts with a 1, # it has to be followed by other digits | [023456789]\d* # otherwise one digit can be fine ) \z /x