remove all square bracket characters, not just ones at being and end of string