# compilePattern (@salmonui/data-grid/engine)

> The compilePattern function of @salmonui/data-grid/engine: Compiles like (% / = any sequence) or wildcard ( = any sequence, ? = one character) into an anchored RegExp.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine/compilePattern

```ts
import { compilePattern } from '@salmonui/data-grid/engine';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine.md).

## Reference

Kind: function

```ts
function compilePattern(pattern: string, operator: 'like' | 'wildcard'): RegExp;
```

Compiles `like` (`%` / `*` = any sequence) or `wildcard` (`*` = any sequence, `?` = one character) into an anchored RegExp.
