Pregunta de entrevista de IBM

Regex question, array based question