$text = '[ b]жЫрная[/ b] корова'; $text = preg_replace('#\[.+\]#Uis', NULL,$text);