code: protected function _parseBbcodeUrl(&$text)
      {
          $text = preg_replace_callback(
              '#\[url\]([^ \"\t\n\r<]*?)\[/url\]#i',
              function ($matches) {
                  return $this->_encodeUrl($matches[1], '', $this->_config['url_limit']);
              },
              $text
          );
          $text = preg_replace_callback(
              '#\[url=([^ \"\t\n\r<]*?)\](.*?)\[/url\]#si',
              function ($matches) {
                  return $this->_encodeUrl($matches[1], $matches[2], $this->_config['url_limit']);
              },
              $text
          );
      }
docs: [url]url[/url] & [url=url]url txt[/url]