Pregunta de entrevista de Amazon

validate string with regEx and arrays question