Amdocs interview question

Pattern matching questions.