This question has already been answered:
There is a string of random characters, in arbitrary places there are groups of characters in brackets
string = fdhjkds(fd12)fdsjf(4234)fdsklv;ad(fffds)gfd,.d what regular expression can remove all sections with brackets.
operation
string = re.sub(r'\(.+\)', '', string) deletes the section from the first to the last bracket, ignoring nested brackets,
(fd12)fdsjf(4234)fdsklv;ad(fffds) and returns an incorrect result.
fdhjkdsgfd,.d How to set a regular season to achieve the desired result?