code: 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
          );
      }
docs: [email]email[/email] & [email=email]email txt[/email]