Pergunta de entrevista da empresa ProQuest

How to find if a string of [, ], (, ) has complete match.