---
title: "doesNotMatch"
source: "https://github.com/remix-run/remix/blob/8905f3943706e1f53696ab83e70a84873cabfc90/packages/assert/src/lib/assert.ts#L470"
---

# doesNotMatch

## Summary

Asserts that `string` does **not** match the given `regexp`.

## Signature

```ts
function doesNotMatch(string: string, regexp: RegExp, message: AssertionMessage): void

```

## Example

```ts
assert.doesNotMatch(html, /Error/)

```

## Parameters

### `string`

The string to test.

### `regexp`

The pattern that must not match.

### `message`

Optional failure message.