﻿# match

> Create a glob-pattern matcher

[Rust primitives](/docs/sdk/rust/primitives/)

```rust
dotenvx_primitives::r#match
```

## Usage

Use the Rust raw identifier r#match. The returned matcher supports * and ? and excludes ignored patterns.

```rust
use dotenvx_primitives::r#match;

let is_allowed = r#match(&["DOTENV_*"], &["DOTENV_PRIVATE_*"]);

assert!(is_allowed("DOTENV_PUBLIC_KEY"));
assert!(!is_allowed("DOTENV_PRIVATE_KEY"));
```
