$text = preg_replace("#\[(/{0,1})glow(=[^\]]*){0,1}\]#i", "", $test);
<?php $text = '[glow=color]blbla[/glow] some more and [glow=color]blbla[/glow]'; echo preg_replace("#\\[(/?)glow(=[^\\]]*)?\\]#i", "", $text); ?>