$fast_and_dirty = true
if ($fast_and_dirty) { // any old thing in square brackets $find[] = '#\[.*/?\]#siU'; $replace[] = ''; $message = preg_replace($find, $replace, $message); }