valid form regex on ruby 1.8