human
Get the string within brackets in Python
assistant
Here is some code to find the string matches within parenthesis from a string `s` using regex

m = re.search('\\[(\\w+)\\]', s)

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