Pergunta de entrevista da empresa Orange

coding question 2. String pattern matching , find occurrence of pattern in string