# [Jelly], <s>50 40</s> 34 [bytes]

-6 bytes thanks to Leaky Nun (getting reduce to work where I couldn't)


Plain and inefficient.

**[Try it online!]** (times out at TIO for [1,1,1,1] - yes, inefficient.)

### How?

Recursively removes pairs of matching brackets that reside right next to each other until no more may be removed for every possible string one may form, keeping such strings which reduce to nothing (hence have all matching content).
    “()“{}“[]“<>”©ẋ"FŒ!QµW;®œṣF¥/µÐLÐḟ - Main link: list: [n(), n{}, n[], n<>]
    “()“{}“[]“<>”                      - literal ["()", "{}", "[]", "<>"]
                 ©                     - copy to register
                   "                   - zip with:
                  ẋ                    -   repeat list
                    F                  - flatten
                     Œ!                - all permutations (yeah, it's inefficient!)
                       Q               - de-duplicate
                        µ              - monadic chain separation (call that a)
                           ®           - recall value from register
                         W             - wrap a in a list
                          ;            - concatenate
                                    Ðḟ - filter discard if:
                                 µÐL   -   loop until no change:
                               ¥/      -     reduce with last two links as a dyad:
                            œṣ         -       split on occurrences of sublist (a pair of brackets)
                              F        -       flatten the result

[Jelly]: https://github.com/DennisMitchell/jelly
[bytes]: https://github.com/DennisMitchell/jelly/wiki/Code-page
[Try it online!]: https://tio.run/nexus/jelly#@/@oYY6GJpCorgUS0bFAwsbuUcPcQysf7upWcjs6STHw0NZw60Prjk5@uHOx26Gl@oe2Hp7gc3jCwx3z/x9uj/z/P9pQxwAIjWMB