original_string: private function _validateLocalPart()
      {
          // First try to match the local part on the common dot-atom format
          $result = false;
  
          // Dot-atom characters are: 1*atext *("." 1*atext)
          // atext: ALPHA / DIGIT / and "!", "#", "$", "%", "&", "'", "*",
          //        "+", "-", "/", "=", "?", "^", "_", "`", "{", "|", "}", "~"
          $atext = 'a-zA-Z0-9\x21\x23\x24\x25\x26\x27\x2a\x2b\x2d\x2f\x3d\x3f\x5e\x5f\x60\x7b\x7c\x7d\x7e';
          if (preg_match('/^[' . $atext . ']+(\x2e+[' . $atext . ']+)*$/', $this->_localPart)) {
              $result = true;
          } else {
              // Try quoted string format
  
              // Quoted-string characters are: DQUOTE *([FWS] qtext/quoted-pair) [FWS] DQUOTE
              // qtext: Non white space controls, and the rest of the US-ASCII characters not
              //   including "\" or the quote character
              $noWsCtl = '\x01-\x08\x0b\x0c\x0e-\x1f\x7f';
              $qtext   = $noWsCtl . '\x21\x23-\x5b\x5d-\x7e';
              $ws      = '\x20\x09';
              if (preg_match('/^\x22([' . $ws . $qtext . '])*[$ws]?\x22$/', $this->_localPart)) {
                  $result = true;
              } else {
                  $this->_error(self::DOT_ATOM);
                  $this->_error(self::QUOTED_STRING);
                  $this->_error(self::INVALID_LOCAL_PART);
              }
          }
  
          return $result;
      }
code: private function _validateLocalPart()
      {
          // First try to match the local part on the common dot-atom format
          $result = false;
  
          // Dot-atom characters are: 1*atext *("." 1*atext)
          // atext: ALPHA / DIGIT / and "!", "#", "$", "%", "&", "'", "*",
          //        "+", "-", "/", "=", "?", "^", "_", "`", "{", "|", "}", "~"
          $atext = 'a-zA-Z0-9\x21\x23\x24\x25\x26\x27\x2a\x2b\x2d\x2f\x3d\x3f\x5e\x5f\x60\x7b\x7c\x7d\x7e';
          if (preg_match('/^[' . $atext . ']+(\x2e+[' . $atext . ']+)*$/', $this->_localPart)) {
              $result = true;
          } else {
              // Try quoted string format
  
              // Quoted-string characters are: DQUOTE *([FWS] qtext/quoted-pair) [FWS] DQUOTE
              // qtext: Non white space controls, and the rest of the US-ASCII characters not
              //   including "\" or the quote character
              $noWsCtl = '\x01-\x08\x0b\x0c\x0e-\x1f\x7f';
              $qtext   = $noWsCtl . '\x21\x23-\x5b\x5d-\x7e';
              $ws      = '\x20\x09';
              if (preg_match('/^\x22([' . $ws . $qtext . '])*[$ws]?\x22$/', $this->_localPart)) {
                  $result = true;
              } else {
                  $this->_error(self::DOT_ATOM);
                  $this->_error(self::QUOTED_STRING);
                  $this->_error(self::INVALID_LOCAL_PART);
              }
          }
  
          return $result;
      }
code_tokens: private function _validateLocalPart ( ) { // First try to match the local part on the common dot-atom format $ result = false ; // Dot-atom characters are: 1*atext *("." 1*atext) // atext: ALPHA / DIGIT / and "!", "#", "$", "%", "&", "'", "*", //        "+", "-", "/", "=", "?", "^", "_", "`", "{", "|", "}", "~" $ atext = 'a-zA-Z0-9\x21\x23\x24\x25\x26\x27\x2a\x2b\x2d\x2f\x3d\x3f\x5e\x5f\x60\x7b\x7c\x7d\x7e' ; if ( preg_match ( '/^[' . $ atext . ']+(\x2e+[' . $ atext . ']+)*$/' , $ this -> _localPart ) ) { $ result = true ; } else { // Try quoted string format // Quoted-string characters are: DQUOTE *([FWS] qtext/quoted-pair) [FWS] DQUOTE // qtext: Non white space controls, and the rest of the US-ASCII characters not //   including "\" or the quote character $ noWsCtl = '\x01-\x08\x0b\x0c\x0e-\x1f\x7f' ; $ qtext = $ noWsCtl . '\x21\x23-\x5b\x5d-\x7e' ; $ ws = '\x20\x09' ; if ( preg_match ( '/^\x22([' . $ ws . $ qtext . '])*[$ws]?\x22$/' , $ this -> _localPart ) ) { $ result = true ; } else { $ this -> _error ( self :: DOT_ATOM ) ; $ this -> _error ( self :: QUOTED_STRING ) ; $ this -> _error ( self :: INVALID_LOCAL_PART ) ; } } return $ result ; }
docstring: Internal method to validate the local part of the email address
  
  @return boolean
docstring_tokens: Internal method to validate the local part of the email address