Question d’entretien chez Epic

How to find the valid parenthesis in this string.