I\'m trying to remove all square brackets from a string including the text inside the opening and closing brackets. It shouldn\'t delete unclosed text.
Here\'s my cod