I need to detect that brackets of different type were properly opened and closed in a string. For instance:
"(){}[]"
--> true."[][{](})"
--> false
I did a try but can't deal with the "false" case:
/(\{+\})|(\(+\))|(\[+\])|^$/.test("[][{](})");
Any idea?