$text = preg_replace('%(\[(quote|php|html|code|nomedia)([^\]]*)\](.*?)\[/(\2)\])%sime', '$this->substitute(\'\1\', $this->_subbed)', $text);