Now also handles [xxx[ and ]xxx] style brackets