<?php $a = 'hello, [how]foo[how]bar. please don\'t remove [are] you?'; echo preg_replace('#\s*\[.+\]\s*#U', ' ', $a); echo "there should be no space between foo and bar :)";
You have javascript disabled. You will not be able to edit any code.