Pergunta de entrevista da empresa BeaconFire Solution

the coding problem is the string pattern