Pergunta de entrevista da empresa Zendesk

Check whether the given string is valid is not based on the following conditions: 1. parenthesis should be valid 2. ' : ' could be standalone 3. :), :(, ):, (: smiles are valid