original_string: public function match($regex)
      {
          $matches = preg_match($regex, $this->value);
          $message = ['%s {{does not match|matches}} the regular expression %s', $this->value, $regex];
          $this->assert((!empty($matches)), $message);
  
          return $this;
      }
code: public function match($regex)
      {
          $matches = preg_match($regex, $this->value);
          $message = ['%s {{does not match|matches}} the regular expression %s', $this->value, $regex];
          $this->assert((!empty($matches)), $message);
  
          return $this;
      }
code_tokens: public function match ( $ regex ) { $ matches = preg_match ( $ regex , $ this -> value ) ; $ message = [ '%s {{does not match|matches}} the regular expression %s' , $ this -> value , $ regex ] ; $ this -> assert ( ( ! empty ( $ matches ) ) , $ message ) ; return $ this ; }
docstring: Assert that the value matches a given regular expression.
  
  @param string $regex A regular expression to match against
  
  @throws AssertionFailureException
  
  @return self
docstring_tokens: Assert that the value matches a given regular expression .