remove spaces inside [ ]