██████╗ ██████╗ ███╗ ███╗██████╗ ██╗██╗ ███████╗████████╗██╗███╗ ███╗███████╗ ██████╗ ███████╗ ██████╗ ███████╗██╗ ██╗
██╔════╝██╔═══██╗████╗ ████║██╔══██╗██║██║ ██╔════╝╚══██╔══╝██║████╗ ████║██╔════╝ ██╔══██╗██╔════╝██╔════╝ ██╔════╝╚██╗██╔╝
██║ ██║ ██║██╔████╔██║██████╔╝██║██║ █████╗ ██║ ██║██╔████╔██║█████╗█████╗██████╔╝█████╗ ██║ ███╗█████╗ ╚███╔╝
██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║██║ ██╔══╝ ██║ ██║██║╚██╔╝██║██╔══╝╚════╝██╔══██╗██╔══╝ ██║ ██║██╔══╝ ██╔██╗
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ██║███████╗███████╗ ██║ ██║██║ ╚═╝ ██║███████╗ ██║ ██║███████╗╚██████╔╝███████╗██╔╝ ██╗
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝
-----------------------------------------------------------------------------------------------------------------------------------
simple proc macro for compile time regex
[![Crates.io](https://img.shields.io/crates/v/compiletime-regex.svg)](https://crates.io/crates/compiletime-regex)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
## 🚀 Installation
include it in your `Cargo.toml` under `[dependencies]`
```toml
compiletime-regex = "*"
```
## 🧑💻 Usage examples
### Basic Usage
```rust
use compiletime_regex::regex;
use regex::Regex;
fn main() {
let hex_color_regex = regex!(r#"^#[a-fA-F0-9]{6}$"#);
assert!(hex_color_regex.is_match("#00C853"));
let invalid_regex: Regex = regex!(r#"^#[a-fA-F0-9]{6"#); // compile time error
}
```
### with `LazyCell` and `LazyLock`
```rust
use std::{cell::LazyCell, sync::LazyLock};
use compiletime_regex::regex;
use regex::Regex;
const USERNAME_REGEX: LazyCell