? is a repetition operator
It indicates zero or one occurrence of the previous pattern. color = "color colour" color.grep(/colou?r/)