<?php $a = 'hello, [how[are]you] don\'t remove this [are] you'; echo preg_replace('#\s*\[.+\]\s*#', ' ', $a);
You have javascript disabled. You will not be able to edit any code.