human
Regular Expression to find brackets in a string
assistant
Here is some code to extract brackets from string `s`

brackets = re.sub('[^(){}[\\]]', '', s)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.