Pergunta de entrevista da empresa TIAA

One question on Design Pattern, Regex, some little coding question and nothing else