Fun exercise on string, regex, and arrays in ruby.