Change prize number matching to Ruby from Regexp