Filter/Bbcode.php
protected function _parseBbcodeEmail(&$text)
    {
        $this->_replaceLoop(
            '#\[email\]([^\[]*?)\[/email\]#si',
            function ($matches) {
                return $this->_encodeEmail($matches[1]);
            },
            $text
        );

        $this->_replaceLoop(
            '#\[email=([^\[]*?)\](.*?)\[/email\]#si',
            function ($matches) {
                return $this->_encodeEmail($matches[1], $matches[2]);
            },
            $text
        );
    }
protected function _parseBbcodeEmail(&$text)
    {
        $this->_replaceLoop(
            '#\[email\]([^\[]*?)\[/email\]#si',
            function ($matches) {
                return $this->_encodeEmail($matches[1]);
            },
            $text
        );

        $this->_replaceLoop(
            '#\[email=([^\[]*?)\](.*?)\[/email\]#si',
            function ($matches) {
                return $this->_encodeEmail($matches[1], $matches[2]);
            },
            $text
        );
    }
protected function _parseBbcodeEmail ( & $ text ) { $ this -> _replaceLoop ( '#\[email\]([^\[]*?)\[/email\]#si' , function ( $ matches ) { return $ this -> _encodeEmail ( $ matches [ 1 ] ) ; } , $ text ) ; $ this -> _replaceLoop ( '#\[email=([^\[]*?)\](.*?)\[/email\]#si' , function ( $ matches ) { return $ this -> _encodeEmail ( $ matches [ 1 ] , $ matches [ 2 ] ) ; } , $ text ) ; }
[email]email[/email] & [email=email]email txt[/email]
[ email ] email [ / email ] & [ email = email ] email txt [ / email ]