I tried to solve a challenge today and I couldn't. I had to make sure that all the braces of a string are closed and in the correct order.
For instance, these would be correct:
{[()]}
{}()[]
{((()))}[]
These would not:
{[}]
{{)}
I thought about doing with regex, I couldn't, can anyone show how to do it? (regex or other ways).
To clarify, I'm not trying to get the content inside the braces, there isn't any content inside.