I have strings extracted from a csv file. I want to know how to remove the text between the curly brackets from the string using Python, ex:
string = 'some text hear { bracket } some text here'
I want to get:
some text hear some text here
I hope anyone can help me to solve this problem, thank you.
EDIT: answer import re string = 'some text hear { bracket } some text here' string = re.sub(r"\s*{.}\s", " ", string) print(string)