original_string: private static function buildRegex(string $expression, bool $is_prefix = false) : string
      {
          $regex  = self::REGEX_DELIMITER . '^';
          $regex .= preg_replace(array_keys(self::$datatypes), self::$datatypes, $expression);
          $regex .= $is_prefix ? '(.*)' : '';
          $regex .= '$' . self::REGEX_DELIMITER;
          return $regex;
      }
code: private static function buildRegex(string $expression, bool $is_prefix = false) : string
      {
          $regex  = self::REGEX_DELIMITER . '^';
          $regex .= preg_replace(array_keys(self::$datatypes), self::$datatypes, $expression);
          $regex .= $is_prefix ? '(.*)' : '';
          $regex .= '$' . self::REGEX_DELIMITER;
          return $regex;
      }
code_tokens: private static function buildRegex ( string $ expression , bool $ is_prefix = false ) : string { $ regex = self :: REGEX_DELIMITER . '^' ; $ regex .= preg_replace ( array_keys ( self :: $ datatypes ) , self :: $ datatypes , $ expression ) ; $ regex .= $ is_prefix ? '(.*)' : '' ; $ regex .= '$' . self :: REGEX_DELIMITER ; return $ regex ; }
docstring: Build a complete regular expression
  
  @param string $expression the route to evaluate
  @param bool $is_prefix    is the route a route prefix
  
  @return string    the complete regular expression
docstring_tokens: Build a complete regular expression