IBM interview question

Regex question, array based question