human
regex to get all text outside of brackets
assistant
Here is some code to get all text that is not enclosed within square brackets in string `example_str`

re.findall('(.*?)\\[.*?\\]', example_str)

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