Pergunta de entrevista da empresa Slice

String regex pattern to replace the strings in particular pattern