# toAnyStringExceptPattern

FUNCTION in `@skmtc/lang-typescript 0.19.1`

A pattern that matches any string except the given names, each matched
exactly. A record beside named properties uses it as its key: the record
then checks only the keys the properties do not name.

With no names, every string matches, and the pattern is empty.

## Signature

```ts
import { toAnyStringExceptPattern } from '@skmtc/lang-typescript'

toAnyStringExceptPattern(args: ToAnyStringExceptPatternArgs): string
```

## Parameters

- `args` (ToAnyStringExceptPatternArgs, required)
  - `names` (string[], required): The strings the pattern must not match, as written (they are escaped here).

## Examples

Example:

```ts
toAnyStringExceptPattern({ names: ['id', 'a.b'] }) // '^(?!(?:id|a\\.b)$)'
toAnyStringExceptPattern({ names: [] })            // ''
```

## Returns

`string`
