# Class goog.testing.mockmatchers.RegexpMatch

code »

    goog.testing.mockmatchers.ArgumentMatcher
      └ goog.testing.mockmatchers.RegexpMatch

A matcher that verifies that an argument matches a given RegExp.

## Constructor

goog.testing.mockmatchers.RegexpMatch ( regexp )

Parameters

regexp: `RegExp`
  The regular expression that the argument must match.

Show:Public Protected Private

## Instance Methods

code »matches ( toVerify, opt_expectation ) ⇒ `boolean`

A function that takes a match argument and an optional MockExpectation which (if provided) will get error information and returns whether or not it matches.

Parameters

toVerify: `*`
  The argument that should be verified.
opt_expectation: `?goog.testing.MockExpectation=`
  The expectation for this match.

Returns

Whether or not a given argument passes verification.

## Instance Properties

code »matchFn_ : `Function`

A function that evaluates a given argument and returns true if it meets a given criteria.

code »matchName_ : `?string`

A string indicating the match intent (e.g. isBoolean or isString).

## Static Properties

code »goog.testing.mockmatchers.RegexpMatch.superClass_ : `goog.testing.mockmatchers.ArgumentMatcher.prototype`