rails regex match code example Example: rails where regex @max_draw = Drawing.where("drawing_number ~* ?", '^A\d{4}$')